消消方块阵换皮表情
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

87 lines
2.8 KiB

import { SoundManager as Sound } from "../../mx/module/audio/SoundManager";
import { Singleton } from "../../mx/tools/Singleton";
import { SDKManager as SDK } from "../sdk/SDKManager";
import { GameData as Data } from "./GameData";
import { GameController as Game, GameController } from "db://assets/script/game/GameController";
import { UIManager as UI } from "../../mx/module/ui/UIManager";
import { PlayerRecordReporting } from "./PlayerRecordReporting";
import { RoleSkin } from "../skin/RoleSkin";
import { Lang } from "../../mx/module/lang/Lang";
import { Purchase } from "../purchase/Purchase";
import { TimeModule } from "../../mx/module/time/TimeModule";
import { NewFun } from "../newFun/NewFun";
import { ResourcesManager } from "../../mx/module/res/ResourcesManager";
import { ConstReplicaManager } from "../manager/ConstReplicaManager";
import { ConstMechanism } from "../manager/ConstMechanism";
import { TargetTaskManager } from "../manager/TargetTaskManager";
import { RoleSingle } from "../role/RoleSingle";
import { storyManager } from "../storyManager/storyManager";
import { RedDot } from "../../mx/module/redDot/RedDot";
/**
* 游戏全局单例模块
*/
export class GameGlobal extends Singleton {
/**UI模块 */
get ui() { return UI.Ins; }
/**音频模块 */
get audio() { return Sound.Ins; }
/**资源模块 */
get res() { return ResourcesManager.getInstance(); }
/**游戏数据 */
get data() { return Data.getInstance(); }
/**sdk模块 */
get sdk() { return SDK.getInstance(); }
get game() { return GameController.instance; }
set game(value: GameController) { GameController.instance = value; }
//建议在这里添加全局单例
//........
/**玩家记录上报模块 */
get PRR() { return PlayerRecordReporting.getInstance(); }
/**皮肤模块 */
get skin() { return RoleSkin.getInstance(); }
/**多语言模块 */
get lang() { return Lang.getInstance(); }
/**内购模块 */
get purchase() { return Purchase.getInstance(); }
/**时间模块 */
get time() { return TimeModule.getInstance(); }
/**新功能模块 */
get newFun() { return NewFun.getInstance(); }
get replicaManager() { return ConstReplicaManager.getInstance(); }
get constMechanism() { return ConstMechanism.getInstance(); }
//目标任务表
get targetTaskManager() { return TargetTaskManager.getInstance(); }
get role() { return RoleSingle.getInstance(); }
get storyManager() { return storyManager.getInstance(); }
/**红点模块 */
get dot() { return RedDot.getInstance(); }
}
/**
* 创建全局gg对象并初始化为GameGlobal的实例
*/
(globalThis as any).gg = GameGlobal.getInstance();
/**
* 全局定义
*/
declare global {
/**游戏全局单例模块 */
const gg: GameGlobal;
}