コード例 #1
0
ファイル: GameRoot.cs プロジェクト: Tamsiree/TamTool
    private void Awake()
    {
        Instance = this;
        //当前场景被销毁时保留
        DontDestroyOnLoad(this);
        //初始化鼠标指针管理者
        CursorManager cursorManager = GetComponent <CursorManager>();

        cursorManager.Init();
        //初始化声音管理者
        AudioManager audioManager = GetComponent <AudioManager>();

        audioManager.Init();
        //初始化特效管理者
        EffectManager effectManager = GetComponent <EffectManager>();

        effectManager.Init();
        //初始化游戏物体管理者
        GameObjectManager gameObjectManager = GetComponent <GameObjectManager>();

        gameObjectManager.Init();
    }