コード例 #1
0
        public override void Update()
        {
            m_bodyParts.Update();

            if (ObjectState.State != ActorState.Active)
            {
                return;
            }

            m_physics.Update();
            m_collider.Update();
            m_destructible.Update();
            m_actionManager.Update();
            m_shurikenReceiver.Update();
            m_hitAnimation.Update();

            if (!m_physics.IsProjected)
            {
                Transform.PosX -= Speed * (float)Globals.TheGame.ElapsedTime;
            }
        }
コード例 #2
0
        public override void Update()
        {
            m_bodyParts.Update();
            m_physics.Update();
            m_collider.Update();
            m_destructible.Update();
            m_hitAnimation.Update();
            m_shurikenReceiver.Update();



            if (_isWaitingToJump)
            {
                _jumpPauseCounter -= (float)Globals.TheGame.ElapsedTime;
                if (_jumpPauseCounter < 0)
                {
                    if (ObjectState.State == ActorState.Active)
                    {
                        JumpActive();
                    }
                    else if (ObjectState.State == ActorState.StandBy)
                    {
                        JumpInactive();
                    }
                }
            }
            else
            {
                if (Transform.PosY >= 0)
                {
                    Transform.PosY = 0;
                    m_physics.Stop();
                    _isWaitingToJump  = true;
                    _jumpPauseCounter = _jumpPause;
                    m_sprite.SetFrame(m_currentFrame + 1);
                }
            }
        }
コード例 #3
0
        public override void Update()
        {
            m_bodyParts.Update();

            //m_measurer.Update();

            if (ObjectState.State != ActorState.Active)
            {
                return;
            }

            m_physics.Update();
            m_collider.Update();
            m_destructible.Update();
            m_actionManager.Update();
            m_hitAnimation.Update();
            m_shurikenReceiver.Update();

            if (!m_physics.IsProjected)
            {
                Transform.PosX -= m_speed;
            }
        }