public class EnemyAiSupportInformation: MonoBehaviour {                 public List EnemyAiCommandBaseList = new List();        public List EnemyAiDronesList = new List();         public SinglePlayerRtsObjectiveSetupDefinition rtsGameUser = null;         public static EnemyAiSupportInformation GetSupport (GameObject gameObject)        {            return gameObject.GetComponent< EnemyAiSupportInformation >();        }          public void GameObjectRefresh()        {            EnemyAiDronesList.Clear();           EnemyAiCommandBaseList.Clear ();            foreach (var unit in rtsGameUser.ActiveUnits) {                if (unit.Contains(“Player Drone Unit”)) EnemyAiDronesList.Add (unit);                if (unit.Contains(“Player Command Base”)) EnemyAiCommandBaseList.Add(unit);            }        }    }

Related Posts

© All Right Reserved