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(); }
public override void Update() { base.Update(); GameObjectPhysics.Update(); GameObjectPhysics.FrictionStop(Side.Right); State.FrictionStop(); positionOnScreen = GameObjectPhysics.GetPosition(); }
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(); }
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(); } }
public override void Update() { base.Update(); GameObjectPhysics.Update(); positionOnScreen = GameObjectPhysics.GetPosition(); }