Exemplo n.º 1
0
        protected override void Awake()
        {
            if (instance != null)
            {
                throw new System.Exception("Multiple RTSManager instances in the scene. You should only have one.");
            }
            instance = this;

            units = new RTSUnitManager();
            units.Awake();

            players = new RTSPlayer[3];
            for (int i = 0; i < players.Length; i++)
            {
                players[i]       = new RTSPlayer();
                players[i].index = i;
            }
        }
Exemplo n.º 2
0
 void OnDestroy()
 {
     units.OnDestroy();
     instance = null;
 }