still working out movement
This commit is contained in:
@@ -14,11 +14,10 @@ public partial class Spearman : FriendlyPeg
|
||||
|
||||
public override MapCell Goal()
|
||||
{
|
||||
Map map = _pegController._playArea._map;
|
||||
Dictionary<Vector2I, MapCell> enemies = GetVisibleEnemies();
|
||||
if (enemies.Count == 0)
|
||||
{
|
||||
return _map._cells[_address];
|
||||
return _cell;
|
||||
}
|
||||
Dictionary<Vector2I, MapCell> closest = enemies.OrderBy(e => (e.Value._occupant._address - _address).Length()).ToDictionary();
|
||||
return closest.ElementAt(0).Value;
|
||||
|
||||
Reference in New Issue
Block a user