public GameObject GetPath(Trap trap, int pathIndex) { if (trap != null) { return(trap.GetPath(pathIndex)); } else { return(null); } }
private void SetPath() { trap = TrapManager._instance.GetTrap(trapIndex); if (trap != null) { GameObject nextPath = trap.GetPath(pathIndex); if (nextPath != null) { path = nextPath; } else { trapIndex++; pathIndex = 0; SetPath(); } } else { path = null; } }