Example #1
0
    void ManagerInitialize()
    {
        networkManager = (Instantiate(Resources.Load("Prefabs/Manager/NetworkManager")) as GameObject).GetComponent <NetworkManager>();
        uiManager      = (Instantiate(Resources.Load("Prefabs/Manager/UIManager") as GameObject)).GetComponent <UIManager>();
        loadingManager = (Instantiate(Resources.Load("Prefabs/Manager/LoadingManager") as GameObject)).GetComponent <LoadingManager>();
        dataManager    = (Instantiate(Resources.Load("Prefabs/Manager/DataManager") as GameObject)).GetComponent <DataManager>();
        battleManager  = (Instantiate(Resources.Load("Prefabs/Manager/BattleManager") as GameObject)).GetComponent <BattleManager>();

        networkManager.ManagerInitialize();
        uiManager.ManagerInitialize();
        loadingManager.ManagerInitialize();
        battleManager.ManagerInitialize();
    }