public void TakeTurn(ICreature creature, World world)
 {
     List<Vector2> surroungingPoints = world.GetSurroundingWorldIndexPositions(creature.WorldIndex);
     if(surroungingPoints.Contains(world.Player.WorldIndex))
     {
         ICreature target = world.Player;
         creature.AttackCreature(ref target);
     }
 }
Exemplo n.º 2
0
        public void TakeTurn(ICreature creature, World world)
        {
            List <Vector2> surroungingPoints = world.GetSurroundingWorldIndexPositions(creature.WorldIndex);

            if (surroungingPoints.Contains(world.Player.WorldIndex))
            {
                ICreature target = world.Player;
                creature.AttackCreature(ref target);
            }
        }
Exemplo n.º 3
0
        private bool MovingToSpaceCausesAttack(Vector2 movePosition, ICreature creature)
        {
            ICreature creatureAtPosition = GetCreatureAtIndex(movePosition);

            if (creatureAtPosition != null)
            {
                creature.AttackCreature(ref creatureAtPosition);
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 4
0
 private bool MovingToSpaceCausesAttack(Vector2 movePosition, ICreature creature)
 {
     ICreature creatureAtPosition = GetCreatureAtIndex(movePosition);
     if (creatureAtPosition != null)
     {
         creature.AttackCreature(ref creatureAtPosition);
         return true;
     }
     else
         return false;
 }