Ejemplo n.º 1
0
        public override void Update()
        {
            if (State.GetType() == typeof(StompedGoombaState))
            {
                if (stompTimer == stompTimerBound)
                {
                    World.Instance.RemoveFromWorld(Uid);
                    return;
                }
                else
                {
                    stompTimer++;
                }
            }
            Sprite.Update();

            // This can be reworked by adding this CONSTANT ACCEL functionality into Physics.
            if (State.GetType() == typeof(LeftMovingGoombaState))
            {
                GameObjectPhysics.Move(Side.Left);
            }
            else if (State.GetType() == typeof(RightMovingGoombaState))
            {
                GameObjectPhysics.Move(Side.Right);
            }
            GameObjectPhysics.Update();
            positionOnScreen = GameObjectPhysics.GetPosition();
        }
Ejemplo n.º 2
0
        public override void Update()
        {
            base.Update();

            GameObjectPhysics.Update();
            GameObjectPhysics.FrictionStop(Side.Right);
            State.FrictionStop();

            positionOnScreen = GameObjectPhysics.GetPosition();
        }
Ejemplo n.º 3
0
        public override void Update()
        {
            Sprite.Update();

            // This can be reworked by adding this CONSTANT ACCEL functionality into Physics.
            if (State.GetType() == typeof(KoopaMovingLeftState))
            {
                GameObjectPhysics.Move(Side.Left);
            }
            else if (State.GetType() == typeof(KoopaMovingRightState))
            {
                GameObjectPhysics.Move(Side.Right);
            }
            GameObjectPhysics.Update();
            positionOnScreen = GameObjectPhysics.GetPosition();
        }
Ejemplo n.º 4
0
        public override void Update()
        {
            base.Update();
            if (State.GetType() == typeof(ShroomMovingUpState))
            {
                positionOnScreen.Y -= bumpOffsets[bumpCounter];
                bumpCounter        += 1;

                if (bumpCounter == bumpOffsets.Length)
                {
                    State.ChangeDirection();
                }
            }
            else
            {
                GameObjectPhysics.Update();
                positionOnScreen = GameObjectPhysics.GetPosition();
            }
        }
Ejemplo n.º 5
0
 public override void Update()
 {
     base.Update();
     GameObjectPhysics.Update();
     positionOnScreen = GameObjectPhysics.GetPosition();
 }