MusicConfigModel.ts 654 B

1234567891011121314151617181920212223242526272829
  1. import { Tablemusic_config } from "../../../module_basic/table/Tablemusic_config";
  2. /**
  3. * 音乐配置数据
  4. */
  5. export class MusicConfigModel {
  6. private config: Tablemusic_config;
  7. private id: number;
  8. constructor(id: number = 1) {
  9. this.id = id;
  10. this.config = new Tablemusic_config();
  11. }
  12. /** 音效用途说明*/
  13. get content(): string {
  14. return this.config.content;
  15. }
  16. /** 音效文件名*/
  17. get name(): string {
  18. return this.config.name;
  19. }
  20. /** 根据id获取音乐文件名*/
  21. getNameById(id: number = 1): string {
  22. this.config.init(id);
  23. return this.name;
  24. }
  25. }