public void ClearRoute() { if (routeIndexes != null) { routeIndexes.Clear(); routeIndexes = null; } routeIDs = null; routePositions = null; routeReady = false; routeCompleted = false; }
public void SetEnemyRoute(int enemyIndex, RoutePersistentData newEnemyRoute) { RoutePersistentData oldEnemyRoute = null; if (enemyRoutes != null) { if ((enemyIndex > -1) && (enemyIndex < enemyRoutes.Length)) { oldEnemyRoute = enemyRoutes[enemyIndex]; if (oldEnemyRoute != null) { oldEnemyRoute.Clear(); } enemyRoutes[enemyIndex] = newEnemyRoute; } } }
public void ClearEnemyRoutes() { RoutePersistentData routeData = null; if (enemyRoutes != null) { for (int i = 0; i < enemyRoutes.Length; i++) { routeData = enemyRoutes[i]; if (routeData != null) { routeData.Clear(); enemyRoutes[i] = null; } } enemyRoutes = null; } }