Update() 공개 메소드

public Update ( ) : void
리턴 void
        public override void Update(GameTime gameTime)
        {
            if (!string.IsNullOrEmpty(_inputProcessor.LastInGameButtonPressed))
            {
                HandleInGameButtonPress();
            }

            base.Update(gameTime);

            _inputProcessor.Update(MillisecondsSinceLastUpdate);

            _motionController.Update(MillisecondsSinceLastUpdate);
            _cameraController.Update(MillisecondsSinceLastUpdate);
            _timerController.Update(MillisecondsSinceLastUpdate);

            for (int i = 0; i < _objectWithGlowEffect.Count; i++)
            {
                _objectWithGlowEffect[i].UpdateGlow(MillisecondsSinceLastUpdate);
            }

            if (!_pauseController.Paused)
            {
                _opaqueParticleEffectManager.Update(MillisecondsSinceLastUpdate);
                _additiveParticleEffectManager.Update(MillisecondsSinceLastUpdate);
                _animationController.Update(MillisecondsSinceLastUpdate);
                _playerCollisionController.CheckForCollisions();
            }
        }
예제 #2
0
        public override void Update(GameTime gameTime)
        {
            _animationController.Update(MillisecondsSinceLastUpdate);
            //_snowController.Update(MillisecondsSinceLastUpdate);

            base.Update(gameTime);
        }
예제 #3
0
        public void Update(GameTime gameTime, Vector3 position, Matrix rotation)
        {
            _position = position;
            _rotation = rotation;

            // Update the models animation.
            animationController.Update(gameTime.ElapsedGameTime, Matrix.Identity);
        }
예제 #4
0
        protected override void OnUpdate()
        {
            base.OnUpdate();

            GroundDetector.Update(Time.deltaTime);
            AnimationController.Update();
            HorizontalMovementController.Update();
        }
예제 #5
0
        protected override void OnUpdateFrame(FrameEventArgs e)
        {
            HandleInput();

            NextUpdateActions?.Invoke();
            NextUpdateActions = null;

            _cameraController.Update();
            _animationController.Update(e.Time);
        }
예제 #6
0
        public override void Update(GameTime gameTime)
        {
            base.Update(gameTime);

            _animationController.Update(MillisecondsSinceLastUpdate);

            _playerTwoStartDialog.Update(MillisecondsSinceLastUpdate);

            _playerOneAvatarCarousel.Update(MillisecondsSinceLastUpdate);
            _playerTwoAvatarCarousel.Update(MillisecondsSinceLastUpdate);
            _areaCarousel.Update(MillisecondsSinceLastUpdate);
        }
        public override void Update(GameTime gameTime)
        {
            CheckAndHandleClear();

            if (_congratulationsPopup.AwaitingDismissal)
            {
                ContentFadeFraction = _textFadeTimer.CurrentActionProgress;
            }

            _animationController.Update(MillisecondsSinceLastUpdate);
            base.Update(gameTime);
        }
    private void Update(float deltaTime)
    {
        if (UpdateController.platform == UpdateController.Platform.Phone)
        {
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                Application.Quit();
            }
        }

        AnimationController.Update(deltaTime);

        SlideController.frictionDelta = CameraController.widthInMeters / Screen.width;
        SlideController.instance.Update(deltaTime);
    }
예제 #9
0
        public override void Update(int millisecondsSinceLastUpdate)
        {
            base.Update(millisecondsSinceLastUpdate);

            _motionController.Update(millisecondsSinceLastUpdate);
            _cameraController.Update(millisecondsSinceLastUpdate);
            _timerController.Update(millisecondsSinceLastUpdate);

            if (!_pauseController.Paused)
            {
                _opaqueParticleEffectManager.Update(millisecondsSinceLastUpdate);
                _additiveParticleEffectManager.Update(millisecondsSinceLastUpdate);
                _animationController.Update(millisecondsSinceLastUpdate);
                _playerCollisionController.CheckForCollisions();
            }
        }
    private void Update(float deltaTime)
    {
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            if (!MenusController.RemoveMenus())
            {
                ScenePassageController.instance.LoadScene <MainMenuController> ((a) => { Destroy(); a(); });
            }
        }

        OptionsController.instance.Update(deltaTime);

        AnimationController.Update(deltaTime);

        SlideController.frictionDelta = CameraController.widthInMeters / Screen.width;
        SlideController.instance.Update(deltaTime);
    }
예제 #11
0
 /// <summary>
 /// Updates the animation controller.
 /// </summary>
 /// <param name="time">the time object.</param>
 internal override void Update(GameTime time)
 {
     animationController.Update(time);
     base.Update(time);
 }
예제 #12
0
 public void Update(GameTime gameTime)
 {
     ModelAnimator.Update(gameTime);
     currentAnimationController.Update(gameTime);
 }
예제 #13
0
            /// <summary>
            /// Converts this trianlge mesh into a BFSOctree.
            /// </summary>
            /// <param name="maxLevel">The maximum node level/depth of any node in
            /// the created DynamicOctree.</param>
            /// <returns>A BFSOctree representing this triangle mesh.</returns>
            public BFSOctree toBFSOctree(byte maxLevel)
            {
                System.Collections.Generic.IEnumerator<AnimationClip> enum1;
                System.Collections.Generic.IEnumerator<AnimationChannel> enum2;
                enum1 = _model.AnimationClips.Values.GetEnumerator();
                enum1.MoveNext();
                enum2 = enum1.Current.Channels.Values.GetEnumerator();
                enum2.MoveNext();
                Matrix[,] animation = new Matrix[enum2.Current.Count, enum1.Current.Channels.Count];

                AnimationClip clip;
                _model.AnimationClips.TryGetValue("Take 001", out clip);
                AnimationController c = new AnimationController(_model.SkeletonBones);
                c.StartClip(clip);

                for (long i = 0; i < enum2.Current.Count; ++i)
                {
                    c.Update(new TimeSpan(clip.Duration.Ticks / enum2.Current.Count), Matrix.Identity);
                    for (int j = 0; j < enum1.Current.Channels.Count; ++j)
                        animation[i, j] = c.SkinnedBoneTransforms[j];
                }

                _model = null;

                BFSOctree result = new BFSOctree(toDynamicOctree(maxLevel));
                result._animation = animation;
                result.frameCount = (uint)enum2.Current.Count;
                result.boneCount = (uint)enum1.Current.Channels.Count;

                return result;
            }
예제 #14
0
        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Update(GameTime gameTime)
        {
            lastKeyboradState = keyboradState;
            keyboradState     = Keyboard.GetState();

            // Exit the sample.
            if (keyboradState.IsKeyDown(Keys.Escape))
            {
                Exit();
            }

            // Change the animation clip smoothly by using CrossFade.
            if (keyboradState.IsKeyDown(Keys.Left) &&
                lastKeyboradState.IsKeyUp(Keys.Left))
            {
                activeAnimationClip = (activeAnimationClip - 1);

                if (activeAnimationClip < 0)
                {
                    activeAnimationClip = skinnedModel.AnimationClips.Count - 1;
                }

                animationController.CrossFade(skinnedModel.AnimationClips.Values[activeAnimationClip], TimeSpan.FromSeconds(0.05f));
            }
            else if (keyboradState.IsKeyDown(Keys.Right) &&
                     lastKeyboradState.IsKeyUp(Keys.Right))
            {
                activeAnimationClip = (activeAnimationClip + 1);

                if (activeAnimationClip >= skinnedModel.AnimationClips.Count)
                {
                    activeAnimationClip = 0;
                }

                animationController.CrossFade(skinnedModel.AnimationClips.Values[activeAnimationClip], TimeSpan.FromSeconds(0.05f));
            }

            // Change the type of interpolation to use between keyframes.
            // The differences are mainly noticeible at an animation speed of 0.1.
            if (keyboradState.IsKeyDown(Keys.D1))
            {
                interpolationMode = "None";

                animationController.TranslationInterpolation = InterpolationMode.None;
                animationController.OrientationInterpolation = InterpolationMode.None;
                animationController.ScaleInterpolation       = InterpolationMode.None;
            }
            else if (keyboradState.IsKeyDown(Keys.D2))
            {
                interpolationMode = "Linear";

                animationController.TranslationInterpolation = InterpolationMode.Linear;
                animationController.OrientationInterpolation = InterpolationMode.Linear;
                animationController.ScaleInterpolation       = InterpolationMode.Linear;
            }
            else if (keyboradState.IsKeyDown(Keys.D3))
            {
                interpolationMode = "Cubic";

                animationController.TranslationInterpolation = InterpolationMode.Cubic;
                animationController.OrientationInterpolation = InterpolationMode.Linear;
                animationController.ScaleInterpolation       = InterpolationMode.Cubic;
            }
            else if (keyboradState.IsKeyDown(Keys.D4))
            {
                interpolationMode = "Spherical";

                animationController.TranslationInterpolation = InterpolationMode.Linear;
                animationController.OrientationInterpolation = InterpolationMode.Spherical;
                animationController.ScaleInterpolation       = InterpolationMode.Linear;
            }

            // Toggle if the animation will loop or not.
            if (keyboradState.IsKeyDown(Keys.Space) && lastKeyboradState.IsKeyUp(Keys.Space))
            {
                animationController.LoopEnabled = !animationController.LoopEnabled;
            }

            // Change the speed of the animation.
            if (keyboradState.IsKeyDown(Keys.Up))
            {
                animationController.Speed += 0.005f;

                animationController.Speed = MathHelper.Clamp(
                    animationController.Speed, 0.1f, 5.0f);
            }
            else if (keyboradState.IsKeyDown(Keys.Down))
            {
                animationController.Speed -= 0.005f;

                animationController.Speed = MathHelper.Clamp(
                    animationController.Speed, 0.1f, 5.0f);
            }

            // Update the models rotation.
            rotation += (float)gameTime.ElapsedGameTime.TotalSeconds * 0.4f;
            // Update the models animation.
            animationController.Update(gameTime.ElapsedGameTime, Matrix.Identity);

            base.Update(gameTime);
        }
예제 #15
0
 /// <summary>
 /// Updates the controller.
 /// CAlled by the API
 /// </summary>
 /// <param name="gt">The gt.</param>
 public void Update(Microsoft.Xna.Framework.GameTime gt)
 {
     animationController.Update(gt.ElapsedGameTime, Matrix.Identity);
 }