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); } }
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); } }
private bool MovingToSpaceCausesAttack(Vector2 movePosition, ICreature creature) { ICreature creatureAtPosition = GetCreatureAtIndex(movePosition); if (creatureAtPosition != null) { creature.AttackCreature(ref creatureAtPosition); return(true); } else { return(false); } }
private bool MovingToSpaceCausesAttack(Vector2 movePosition, ICreature creature) { ICreature creatureAtPosition = GetCreatureAtIndex(movePosition); if (creatureAtPosition != null) { creature.AttackCreature(ref creatureAtPosition); return true; } else return false; }