public static void Simulate()
        {
            if (!Initialized)
            {
                return;
            }

            ReplayManager.Simulate();
            PlayerManager.Simulate();
            NetworkManager.Simulate();

            if (!FrameManager.CanAdvanceFrame)
            {
                return;
            }
            else
            {
            }
            FrameManager.Simulate();

            #region Custom Behaviors
            MovementGroup.Simulate();
            #endregion

            AgentController.Simulate();



            PhysicsManager.Simulate();
            CoroutineManager.Simulate();
            InputManager.Simulate();
            SelectionManager.Simulate();
            FrameCount++;
        }
Beispiel #2
0
 void OnGUI()
 {
     if (CommandManager.sendType == SendState.Network)
     {
         return;
     }
     if (ReplayManager.IsPlayingBack)
     {
         if (GUILayout.Button("Play"))
         {
             ReplayManager.Stop();
             Application.LoadLevel(Application.loadedLevel);
         }
     }
     else
     {
         if (GUILayout.Button("Replay"))
         {
             ReplayManager.Save();
             ReplayManager.Play();
             Application.LoadLevel(Application.loadedLevel);
         }
     }
 }