Пример #1
0
        internal static void Initialize(GameManager gameManager)
        {
            MainGameManager = gameManager;

            if (!Loaded)
            {
                Setup();
                Loaded = true;
            }

            InitializeHelpers();


            DefaultMessageRaiser.EarlyInitialize();
            SimulationTimer.Stop();
            SimulationTimer.Reset();
            SimulationTimer.Start();
            LSDatabaseManager.Initialize();
            LSUtility.Initialize(1);
            InfluenceCount = 0;
            Time.timeScale = 1f;
            Stalled        = true;

            FrameCount          = 0;
            InfluenceFrameCount = 0;

            ClientManager.Initialize(MainGameManager.MainNetworkHelper);

            TriggerManager.Initialize();

            GridManager.Initialize();

            TeamManager.Initialize();

            CoroutineManager.Initialize();
            FrameManager.Initialize();

            CommandManager.Initialize();

            AgentController.Initialize();
            TeamManager.LateInitialize();

            PhysicsManager.Initialize();
            PlayerManager.Initialize();
            SelectionManager.Initialize();
            InfluenceManager.Initialize();
            ProjectileManager.Initialize();

            DefaultMessageRaiser.LateInitialize();

            BehaviourHelperManager.LateInitialize();
            if (onInitialize != null)
            {
                onInitialize();
            }
        }
Пример #2
0
        public static void Initialize(GameManager gameManager)
        {
            MainGameManager = gameManager;
            Managers        = gameManager.Managers;

            if (!Loaded)
            {
                Setup();
                Loaded = true;
            }


            SimulationTimer.Reset();
            SimulationTimer.Start();
            LSDatabaseManager.Initialize();
            LSUtility.Initialize(1);
            Interfacing.Initialize();
            InfluenceCount = 0;
            Time.timeScale = 1f;
            Stalled        = true;

            FrameCount          = 0;
            InfluenceFrameCount = 0;

            GridManager.Generate();
            GridManager.Initialize();

            TeamManager.Initialize();

            CoroutineManager.Initialize();
            FrameManager.Initialize();

            CommandManager.Initialize();
            BehaviourHelper.GlobalInitialize();

            AgentController.Initialize();
            TeamManager.LateInitialize();

            PhysicsManager.Initialize();
            PlayerManager.Initialize();
            SelectionManager.Initialize();
            InfluenceManager.Initialize();
            ProjectileManager.Initialize();

            foreach (LSManager manager in Managers)
            {
                manager.Initialize();
            }

            LoadSceneObjects();

            Started = true;
            ClientManager.Initialize();
        }
Пример #3
0
        internal static void Initialize(ILockstepEventsHandler[] helpers, NetworkHelper networkHelper)
        {
            PlayRate = FixedMath.One;
            //PauseCount = 0;

            if (!Loaded)
            {
                Setup();
                Loaded = true;
            }



            DefaultMessageRaiser.EarlyInitialize();

            LSDatabaseManager.Initialize();
            LSUtility.Initialize(1);
            InfluenceCount = 0;
            Time.timeScale = 1f;

            Stalled = true;

            FrameCount          = 0;
            InfluenceFrameCount = 0;
            MainNetworkHelper   = networkHelper;
            AgentController.Initialize();
            ClientManager.Initialize(MainNetworkHelper);

            BehaviourHelperManager.Initialize(helpers);

            GridManager.Initialize();


            CoroutineManager.Initialize();
            FrameManager.Initialize();

            CommandManager.Initialize();


            PhysicsManager.Initialize();
            PlayerManager.Initialize();
            SelectionManager.Initialize();
            InfluenceManager.Initialize();
            ProjectileManager.Initialize();

            DefaultMessageRaiser.LateInitialize();
            BehaviourHelperManager.LateInitialize();
            if (onInitialize != null)
            {
                onInitialize();
            }
        }
Пример #4
0
        public static void Initialize()
        {
            Time.fixedDeltaTime = FixedMath.ToFloat(Timestep);
            FrameCount          = 0;
            LSUtility.Initialize(1);
            CoroutineManager.Initialize();

            NetworkManager.Initialize();
            FrameManager.Initialize();
            AgentController.Initialize(Instance.AgentObjects);
            PhysicsManager.Initialize();
            InputManager.Initialize();
            PlayerManager.Initialize();

            MovementGroup.Initialize();

            Initialized = true;
        }