public AITeam(AITeamType type, Color color, AIFormation formation, AIObjective objective) { _teamType = type; _selectedObject = null; _leader = null; _formation = formation; _objective = objective; _color = color; }
public AITeam(AITeamType type, Color color) { _teamType = type; _selectedObject = null; _leader = null; _formation = AIFormation.Row; _objective = AIObjective.Hold; _color = color; }
public void CreateTeam(AITeamType type, Color color, int numInfantry, int numSniper, int numSupport, Vector3 position, bool areBots) { AITeam team = new AITeam(type, color); team.Add(new AIObject(AIRoleType.TeamLeader, position, areBots)); for (int i = 0; i < numInfantry; i++) { team.Add(new AIObject(AIRoleType.Infantry, position, areBots)); } for (int i = 0; i < numSniper; i++) { team.Add(new AIObject(AIRoleType.Sniper, position, areBots)); } for (int i = 0; i < numSupport; i++) { team.Add(new AIObject(AIRoleType.Support, position, areBots)); } _teams.Add(team); }
public void SelectTeam(AITeamType team) { ClearSelect(); foreach (AITeam t in _teams) { if (t.TeamType == team) { _selectedTeam = t; } } foreach (AIObject aiobj in _aiobjects) { if (aiobj.Team == _selectedTeam) { aiobj.Selected = true; if (aiobj.IsLeader) { _selectedObject = aiobj; aiobj.Selected = true; } } } }
public void SelectTeam(AITeamType team) { ClearSelect(); foreach (AITeam t in _teams) { if(t.TeamType == team) _selectedTeam = t; } foreach (AIObject aiobj in _aiobjects) { if (aiobj.Team == _selectedTeam) { aiobj.Selected = true; if (aiobj.IsLeader) { _selectedObject = aiobj; aiobj.Selected = true; } } } }
public void CreateTeam(AITeamType type, Color color, int numInfantry, int numSniper, int numSupport, Vector3 position, bool areBots) { AITeam team = new AITeam(type, color); team.Add(new AIObject(AIRoleType.TeamLeader, position, areBots)); for (int i = 0; i < numInfantry; i++) team.Add(new AIObject(AIRoleType.Infantry, position, areBots)); for (int i = 0; i < numSniper; i++) team.Add(new AIObject(AIRoleType.Sniper, position, areBots)); for (int i = 0; i < numSupport; i++) team.Add(new AIObject(AIRoleType.Support, position, areBots)); _teams.Add(team); }