private bool CanEvadeTheBombInTime() { owner.aiNode = owner.grid.NodeFromWorldPoint(owner.transform.position); List <Node> bombRange = owner.grid.GetNeighbours(owner.aiNode, owner.bombScript.bombRange); bombRange.Add(owner.aiNode); List <Node> safeNodes = new List <Node>(); foreach (Node node in owner.accessibleTiles) { if (node.isBomb) { continue; } if (node.GetDropRangeCount() > 0) { continue; } if (bombRange.Contains(node)) { continue; } Node[] waypoints = PathRequestManager.GetWaypoints(owner.aiNode, node); if (waypoints.Length > 0) { if (waypoints.Any(x => x.GetTimeToExplode() == 1 || x.GetTimeToExplode() == 0)) { foreach (Node n in waypoints) { if (n.isBomb || n.GetDropRangeCount() > 0) { return(false); } if (n.GetTimeToExplode() >= 0 && n.GetTimeToExplode() <= 1) { return(false); } } } break; } } return(true); }