Ejemplo n.º 1
0
        /// <summary>
        /// Updates resource.
        /// </summary>
        public virtual void Update()
        {
            MinerWars.AppCode.Game.Render.MyRender.GetRenderProfiler().StartProfilingBlock("MyMissions.Update");
            MyMissions.Update();

            MinerWars.AppCode.Game.Render.MyRender.GetRenderProfiler().StartNextBlock("MyGlobalEvents.Update()");
            //Update global events in the game. This should be driven and synchronized
            //by sector server
            World.Global.MyGlobalEvents.Update();

            MinerWars.AppCode.Game.Render.MyRender.GetRenderProfiler().StartNextBlock("RefreshAvailableMissions");

            // update global game time
            GameDateTime = GameDateTime + new TimeSpan(0, 0, 0, 0, MyConstants.PHYSICS_STEP_SIZE_IN_MILLISECONDS);

            // check if some new mission are available (because time has advanced)
            MyMissions.RefreshAvailableMissions();
            MotherShipPosition.Update();

            MinerWars.AppCode.Game.Render.MyRender.GetRenderProfiler().EndProfilingBlock();
        }