Esempio n. 1
0
 public void ClearRoute()
 {
     if (routeIndexes != null)
     {
         routeIndexes.Clear();
         routeIndexes = null;
     }
     routeIDs       = null;
     routePositions = null;
     routeReady     = false;
     routeCompleted = false;
 }
Esempio n. 2
0
    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;
            }
        }
    }
Esempio n. 3
0
    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;
        }
    }