implemented more code for adding more pegs, but still a lot of work to do on pathfinding, targeting, map etc.
This commit is contained in:
+3
-3
@@ -27,7 +27,7 @@ public partial class PegAction : Node2D
|
||||
{
|
||||
return PEG._staminaRemaining >= _cost
|
||||
&& _usesRemaining > 0
|
||||
&& PEG._address.Y <= _range;
|
||||
&& (PEG._address - Target(PEG)).Length() <= _range;
|
||||
}
|
||||
|
||||
public virtual void Reset()
|
||||
@@ -35,8 +35,8 @@ public partial class PegAction : Node2D
|
||||
_usesRemaining = _usesMax;
|
||||
}
|
||||
|
||||
public virtual Vector2 Target(Peg PEG)
|
||||
public virtual Vector2I Target(Peg PEG)
|
||||
{
|
||||
return PEG.GlobalPosition;
|
||||
return PEG._address;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user