Tablemusic_config.ts 737 B

1234567891011121314151617181920212223242526272829303132333435
  1. import { JsonUtil } from "db://assets/core_tgx/base/utils/JsonUtil";
  2. export class Tablemusic_config {
  3. static TableName: string = "music_config";
  4. private data: any;
  5. init(id: number) {
  6. const table = JsonUtil.get(Tablemusic_config.TableName);
  7. this.data = table[id];
  8. this.id = id;
  9. }
  10. /** 编号【KEY】 */
  11. id: number = 0;
  12. /** 音效文件ID */
  13. get name(): string {
  14. return this.data.name;
  15. }
  16. /** 音效的类型 */
  17. get type(): number {
  18. return this.data.type;
  19. }
  20. /** 音效内置cd */
  21. get cd(): number {
  22. return this.data.cd;
  23. }
  24. /** 音效用途说明 */
  25. get content(): string {
  26. return this.data.content;
  27. }
  28. }