public void AssignNewTarget(EncounterAgent target) { this.target = target; targetPilot = target.GetComponent <ShipPiloting>(); targetEngines = target.GetComponent <ShipEngine>(); Start(); }
public List <EncounterAgent> GetEnemiesInEncounter(EncounterAgent agent) { List <EncounterAgent> enemies = new List <EncounterAgent>(); uint[] enemyFactionIDs = agent.GetComponent <Ownership>().GetEnemyFactionIDs(); foreach (var enemyFactionID in enemyFactionIDs) { foreach (var enemy in encounterMembers[enemyFactionID]) { enemies.Add(enemy); } } return(enemies); }
public void RemoveFromEncounter(EncounterAgent agent) { encounterMembers[agent.GetComponent <Ownership>().OwnerFactionID].Remove(agent); agent.EncounterLeft(); }
public void AddToEncounter(EncounterAgent agent) { encounterMembers[agent.GetComponent <Ownership>().OwnerFactionID].Add(agent); agent.EncounterJoined(this); }