think i finally solved movement going into enemy territory
This commit is contained in:
+3
-2
@@ -25,9 +25,10 @@ public partial class PegAction : Node2D
|
||||
|
||||
public virtual bool MeetsCriteria(Peg PEG)
|
||||
{
|
||||
MapCell target = Target(PEG);
|
||||
return PEG._staminaRemaining >= _cost
|
||||
&& _usesRemaining > 0
|
||||
&& (PEG._address - Target(PEG)._address).Length() <= _range;
|
||||
&& (PEG._address - target._address).Length() <= _range;
|
||||
}
|
||||
|
||||
public virtual void Reset()
|
||||
@@ -37,6 +38,6 @@ public partial class PegAction : Node2D
|
||||
|
||||
public virtual MapCell Target(Peg PEG)
|
||||
{
|
||||
return PEG._cell;
|
||||
return PEG.Goal();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user