/* * When a player is a computer, this function is called in their start() method. * Adds the unit to the appropriate list. */ public void AddEnemyToList(Enemy script, int team) { if (team == 0) { blueComp.Add(script); } else redComp.Add(script); }
public AIAction(Enemy o,Actions a,Vector3 p) { obj = o; action = a; pos = p; }
//Call this to add the passed in Enemy to the List of Enemy objects. public void AddEnemyToList(Enemy script) { //Add Enemy to List enemies. enemies.Add(script); }
/* * When a unit dies, remove them from the list, then check for a win condition. */ public void removeEnemy(Enemy dead, int team) { if (team == 0) { blueComp.Remove(dead); if (blueComp.Count == 0) { showEndState(); } } else { redComp.Remove(dead); if (redComp.Count == 0) { showEndState(); } } }
} //End.Update() //Call this to add the passed in Enemy to the List of Enemy objects. public void AddEnemyToList(Enemy script) { //TODO ~Z 16.01.30 | Need to determine which level we are on to know which list to add to. //Add Enemy to List enemies. enemies.Add(script); } //End.AddEnemyToList()