TablePromptWindow.ts 878 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * @Author: dgflash
  3. * @Date: 2022-06-02 09:38:48
  4. * @LastEditors: dgflash
  5. * @LastEditTime: 2022-08-02 14:26:35
  6. */
  7. import { JsonUtil } from "../../../../../extensions/oops-plugin-framework/assets/core/utils/JsonUtil";
  8. export class TablePromptWindow {
  9. static TableName: string = "PromptWindow";
  10. private data: any;
  11. init(id: number, id1: number, id2: number) {
  12. var table = JsonUtil.get(TablePromptWindow.TableName);
  13. this.data = table[id][id1][id2];
  14. this.id = id;
  15. this.id1 = id1;
  16. this.id2 = id2;
  17. }
  18. id: number = 0;
  19. id1: number = 0;
  20. id2: number = 0;
  21. get title(): string {
  22. return this.data.title;
  23. }
  24. get describe(): string {
  25. return this.data.describe;
  26. }
  27. get array(): any {
  28. return this.data.array;
  29. }
  30. get hp(): number {
  31. return this.data.hp;
  32. }
  33. }