Exemple #1
0
    /**
     *   Initialization
     **/
    void Awake()
    {
        //set the singleton accessor
        _i = this;

        //add game modes to list
        gameModes.Add("LandMode", new GameMode_LandMode());
        gameModes.Add("SpaceShipBridge", new GameMode_SpaceShipBridge());
        gameModes.Add("MainMenu", new GameMode_MainMenu());

        //Run each modes Awake method
        foreach (GameMode_Base mode in gameModes.Values)
        {
            mode.SetupAwake();
        }
    }
Exemple #2
0
 void OnDestroy()
 {
     //remove singleton accessor
     _i = null;
 }