修改:协议和配置表
This commit is contained in:
@@ -6,7 +6,7 @@ import proto from 'db://assets/Scripts/proto/proto.pb.js';
|
||||
|
||||
export class ThemeData extends BaseData {
|
||||
// 主题数据
|
||||
private _themes = new Map<number, proto.cs.IHallTheme>();
|
||||
private _themes = new Map<number, proto.cs.IThemes>();
|
||||
// 主题 id
|
||||
private _themeIds: number[] = [];
|
||||
|
||||
@@ -32,7 +32,7 @@ export class ThemeData extends BaseData {
|
||||
this._themes.clear();
|
||||
this._themeIds = [];
|
||||
for (const t of list) {
|
||||
const vo: proto.cs.IHallTheme = {
|
||||
const vo: proto.cs.IThemes = {
|
||||
id: t.id || 0, // 主题 id
|
||||
key: t.key || "", // 多语言键
|
||||
name: t.name || "", // 主题名称
|
||||
@@ -47,7 +47,7 @@ export class ThemeData extends BaseData {
|
||||
}
|
||||
|
||||
/** 获取所有主题数据 */
|
||||
public get themes(): Map<number, proto.cs.IHallTheme> { return this._themes; }
|
||||
public get themes(): Map<number, proto.cs.IThemes> { return this._themes; }
|
||||
|
||||
/** 获取所有主题数据的数量 */
|
||||
public get themesCount(): number { return this._themes ? this._themes.size : 0; }
|
||||
@@ -56,7 +56,7 @@ export class ThemeData extends BaseData {
|
||||
public get themeIds(): number[] { return this._themeIds; }
|
||||
|
||||
/** 根据主题 id 获取主题数据 */
|
||||
private getThemeDataById(id: number): proto.cs.IHallTheme | null {
|
||||
private getThemeDataById(id: number): proto.cs.IThemes | null {
|
||||
if (!this._themes) return null;
|
||||
return this._themes.get(id) ?? null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user