Exemplo n.º 1
0
        public void addCharacterAt(Vector3 location, Actor.Faction faction, IslandPathingProfile islandPathingProfile, ActorStateProfile actorStateProfile)
        {
            Character character = new Character(new AxisAlignedBoundingBox(location + new Vector3(), .6f, .6f, 1.8f), faction);

            if (faction == Actor.Faction.enemy)
            {
                character.setJobAndCheckUseability(new AggressiveStanceJob(character));
            }
            actors.Add(character);
        }
Exemplo n.º 2
0
 public void deleteAllEnemiesOfFactionInAABB(BoundingBox playerIslandBox, Actor.Faction faction)
 {
     for (int i = actors.Count - 1; i >= 0; i--)
     {
         if (actors[i].getFaction() == faction)
         {
             if (actors[i].getBoundingBox().Intersects(playerIslandBox))
             {
                 actors.RemoveAt(i);
             }
         }
     }
 }
Exemplo n.º 3
0
        public List <Actor> getAllActorsWithFaction(Actor.Faction faction)
        {
            List <Actor> result = new List <Actor>();

            foreach (Actor test in actors)
            {
                if (test.getFaction() == faction)
                {
                    result.Add(test);
                }
            }
            return(result);
        }
Exemplo n.º 4
0
 public static bool areHostile(Actor.Faction faction1, Actor.Faction faction2)
 {
     if (faction1 == Faction.friendly && faction2 == Faction.enemy)
     {
         return(true);
     }
     else if (faction1 == Faction.enemy && faction2 == Faction.friendly)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemplo n.º 5
0
 public List <Actor> getAllActorsWithFaction(Actor.Faction faction)
 {
     return(actorManager.getAllActorsWithFaction(faction));
 }
Exemplo n.º 6
0
 public void addCharacterAt(Vector3 location, Actor.Faction faction)
 {
     actorManager.addCharacterAt(location, faction,
                                 islandManager.getClosestIslandToLocation(location).getPathingProfile(),
                                 getActorProfile());
 }