Exemplo n.º 1
0
        void Update(GameTime time)
        {
            try {
                float deltaTime = (float)gameTime.ElapsedGameTime.TotalSeconds;

                Stats.UpdateStart();

                SoundEffectInstancePool.Update();

                if (Director.NextScene != null)
                {
                    Director.SetNextScene();
                }

                CCScheduler.SharedScheduler.Update(deltaTime);
                ActionManager?.Update(deltaTime);

                ProcessInput();

                Stats.UpdateEnd(deltaTime);
            }
            catch (Exception e) {
                string msg = new System.Text.StringBuilder()
                             .AppendLine($"Draw.Stats.Enabled : {e.Message}")
                             .AppendLine($"Stack Trace: {e.StackTrace}")
                             .ToString();

                LogMessage(msg);
            }
        }
Exemplo n.º 2
0
        internal void DoUpdate(GameTime gameTime)
        {
            AssertNotDisposed();
            if (Platform.BeforeUpdate(gameTime))
            {
                // Once per frame, we need to check currently
                // playing sounds to see if they've stopped,
                // and return them back to the pool if so.
                SoundEffectInstancePool.Update();

                Update(gameTime);

                //The TouchPanel needs to know the time for when touches arrive
                TouchPanelState.CurrentTimestamp = gameTime.TotalGameTime;
            }
        }
Exemplo n.º 3
0
        void Update(GameTime time)
        {
            float deltaTime = (float)gameTime.ElapsedGameTime.TotalSeconds;

            Stats.UpdateStart();

            SoundEffectInstancePool.Update();

            if (Director.NextScene != null)
            {
                Director.SetNextScene();
            }

            CCScheduler.SharedScheduler.Update(deltaTime);
            ActionManager.Update(deltaTime);

            ProcessInput();

            Stats.UpdateEnd(deltaTime);
        }
Exemplo n.º 4
0
 private static void DoUpdate()
 {
     DynamicSoundEffectInstanceManager.UpdatePlayingInstances();
     SoundEffectInstancePool.Update();
     Microphone.UpdateMicrophones();
 }