SPIRAL BY CHRISTIAN
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -113,30 +113,40 @@ namespace DepthsBelow
|
|||||||
List<Point> soldierCollisions = new List<Point>();
|
List<Point> soldierCollisions = new List<Point>();
|
||||||
|
|
||||||
// Collision with units at a standstill
|
// Collision with units at a standstill
|
||||||
foreach (var soldier in Squad)
|
//foreach (var soldier in Squad)
|
||||||
{
|
//{
|
||||||
if (soldier != this && !soldier.GetComponent<PathFinder>().IsMoving)
|
// if (soldier != this)
|
||||||
{
|
// {
|
||||||
soldierCollisions.Add(soldier.Transform.Grid);
|
// if (!soldier.GetComponent<PathFinder>().IsMoving)
|
||||||
}
|
// {
|
||||||
}
|
// soldierCollisions.Add(soldier.Transform.Grid);
|
||||||
|
// }
|
||||||
|
// if (soldier.Transform.Grid == nextNode.Position)
|
||||||
|
// {
|
||||||
|
// GetComponent<PathFinder>().RecreatePath(soldierCollisions);
|
||||||
|
// nextNode = GetComponent<PathFinder>().Next();
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
// Collision with moving units
|
//}
|
||||||
foreach (var soldier in Squad)
|
|
||||||
{
|
// Collision with moving units
|
||||||
if (soldier != this)
|
//foreach (var soldier in Squad)
|
||||||
{
|
//{
|
||||||
var pathFinder = soldier.GetComponent<PathFinder>();
|
// if (soldier != this)
|
||||||
var position = nextNode.Position;
|
// {
|
||||||
if (soldier.Transform.Grid == position)
|
// var pathFinder = soldier.GetComponent<PathFinder>();
|
||||||
{
|
// var position = nextNode.Position;
|
||||||
soldierCollisions.Add(soldier.Transform.Grid);
|
// if (soldier.Transform.Grid == position)
|
||||||
GetComponent<PathFinder>().RecreatePath(soldierCollisions);
|
// {
|
||||||
nextNode = GetComponent<PathFinder>().Next();
|
// soldierCollisions.Add(soldier.Transform.Grid);
|
||||||
break;
|
// GetComponent<PathFinder>().RecreatePath(soldierCollisions);
|
||||||
}
|
// nextNode = GetComponent<PathFinder>().Next();
|
||||||
}
|
// break;
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
if (nextNode != null)
|
if (nextNode != null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user