public void AssignNewTarget(EncounterAgent target)
 {
     this.target   = target;
     targetPilot   = target.GetComponent <ShipPiloting>();
     targetEngines = target.GetComponent <ShipEngine>();
     Start();
 }
Example #2
0
    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);
    }
Example #3
0
 public void RemoveFromEncounter(EncounterAgent agent)
 {
     encounterMembers[agent.GetComponent <Ownership>().OwnerFactionID].Remove(agent);
     agent.EncounterLeft();
 }
Example #4
0
 public void AddToEncounter(EncounterAgent agent)
 {
     encounterMembers[agent.GetComponent <Ownership>().OwnerFactionID].Add(agent);
     agent.EncounterJoined(this);
 }