hallModel.ts 960 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import BaseModel from "../../lightMVC/core/base/BaseModel";
  2. import Notification from "../Notification";
  3. export default class hallModel extends BaseModel {
  4. public init(): void {
  5. }
  6. public sendNotify(notify: string, data?: any): void {
  7. this.sendNoti(notify, data);
  8. }
  9. /**
  10. * 更新金币
  11. */
  12. public updateCoinNumber(): void {
  13. this.sendNoti('UPDATE_COIN', '更新金币');
  14. }
  15. public updateDiamond(): void {
  16. this.sendNoti('UPDATE_DIAMOND', '更新体力');
  17. }
  18. /**
  19. * 更新体力
  20. */
  21. public updateTiliNumber(): void {
  22. this.sendNoti('UPDATE_TILI', '更新体力');
  23. }
  24. /**
  25. * 更新体力倒计时
  26. */
  27. public updateTiliJishi(isShow: boolean, timeStr?: string): void {
  28. let data = { "isShow": isShow };
  29. if (timeStr) data['timeStr'] = timeStr;
  30. this.sendNoti('UPDATE_TILI_JISHI', data);
  31. }
  32. public clear(): void {
  33. }
  34. }