Esempio n. 1
0
 public static void Clear()
 {
     for (int i = 0; i < PlayerManager.AgentControllers.PeakCount; i++)
     {
         if (PlayerManager.AgentControllers.arrayAllocation [i])
         {
             FastBucket <LSAgent> selectedAgents = PlayerManager.AgentControllers[i].SelectedAgents;
             for (int j = 0; j < selectedAgents.PeakCount; j++)
             {
                 if (selectedAgents.arrayAllocation [j])
                 {
                     selectedAgents [j].IsSelected = false;
                     onRemove(selectedAgents [j]);
                 }
             }
             selectedAgents.FastClear();
         }
     }
     //if (MainSelectedAgent && MainSelectedAgent.IsSelected)
     //{
     //    MainSelectedAgent.IsSelected = false;
     //}
     MainSelectedAgent = null;
     onClear();
 }
Esempio n. 2
0
 protected override void OnInitialize()
 {
     IsPlayingBack = ReplayManager.IsPlayingBack;
     if (!IsPlayingBack)
     {
         Hashes.FastClear();
     }
 }
        public static void Initialize()
        {
            for (int i = AllocatedNodes.Count - 1; i >= 0; i--)
            {
                AllocatedNodes [i].Reset();
            }

            ActivatedNodes.FastClear();
            AllocatedNodes.FastClear();
        }
Esempio n. 4
0
        static void ResetVars()
        {
            for (int i = 0; i < PeakCount; i++)
            {
                SimObjects[i] = null;
            }
            DynamicSimObjects.FastClear();
            Raycaster._Version = 0;
            PeakCount          = 0;
            CachedIDs.FastClear();

            CollisionPair.CurrentCollisionPair = null;
            PeakCount        = 0;
            AssimilatedCount = 0;

            Partition.Initialize();
            RanCollisionPairs.FastClear();
            InactiveCollisionPairs.FastClear();

            _positionCycler = 0;
        }
        public static void Deactivate()
        {
            for (int i = 0; i < PeakGlobalID; i++)
            {
                if (GlobalAgentActive[i])
                {
                    DestroyAgent(GlobalAgents[i], true);
                }
            }
            CheckDestroyAgent();

            for (int i = 0; i < DeathingAgents.PeakCount; i++)
            {
                if (DeathingAgents.arrayAllocation[i])
                {
                    RTSAgent agent = DeathingAgents[i];
                    AgentController.CompleteLife(agent);
                }
            }
            DeathingAgents.FastClear();
        }
        //   public static Player MainController.Commander { get; private set; }
        //  public static AgentController _environmentController { get; set; }
        #endregion

        #region Public
        public static void Initialize()
        {
            MainController = null;
            Players.FastClear();
            AgentControllers.FastClear();
        }
 protected override void OnInitialize()
 {
     Instance = this;
     activeGroups.FastClear();
 }