AP fixed
This commit is contained in:
@@ -232,16 +232,26 @@ namespace DepthsBelow
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (soldier.AP >= soldier.GetComponent<Component.PathFinder>().Length)
|
Console.WriteLine("before " + soldier.AP);
|
||||||
{
|
|
||||||
soldier.GetComponent<Component.PathFinder>().Goal = point;
|
|
||||||
soldier.AP -= soldier.GetComponent<Component.PathFinder>().Length;
|
|
||||||
|
|
||||||
Console.WriteLine(x + " " + y);
|
soldier.GetComponent<Component.PathFinder>().Goal = point;
|
||||||
Console.WriteLine(soldier.GetComponent<Component.PathFinder>().Goal.X + " " +
|
var length = soldier.GetComponent<Component.PathFinder>().Length - 1;
|
||||||
soldier.GetComponent<Component.PathFinder>().Goal.Y);
|
|
||||||
|
|
||||||
}
|
if (soldier.GetComponent<Component.PathFinder>().IsMoving == true)
|
||||||
|
{
|
||||||
|
if (soldier.AP >= length)
|
||||||
|
{
|
||||||
|
|
||||||
|
soldier.AP -= length;
|
||||||
|
|
||||||
|
Console.WriteLine("then " + soldier.AP);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
soldier.GetComponent<Component.PathFinder>().Stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user