public void Down() { if (!(MarioAnimatedState is MarioDeadState)) { MarioAnimatedState.Down(); } }
public void Idle() { if (!(MarioAnimatedState is MarioDeadState)) { MarioAnimatedState.Idle(); MarioPhysics.IsRunning = false; } }
public void Up() { if (!(MarioAnimatedState is MarioDeadState)) { MarioPhysics.IsRunning = true; MarioAnimatedState.Up(); MarioPhysics.Jump(); } }
public void Right() { if (!(MarioAnimatedState is MarioDeadState)) { MarioPhysics.IsRunning = true; MarioAnimatedState.Right(); MarioPhysics.MoveRight(); } }
public void Update(GameTime gameTime) { MarioAnimatedState.Update(gameTime); CheckDead(); MarioPhysics.Update(gameTime); time += gameTime.ElapsedGameTime.TotalSeconds; if (time > delay) { action = true; time = Constant.Constant.Instance.InitialTime; } }
public void Up() { if (!(MarioAnimatedState is MarioDeadState)) { if (MarioPhysics.IsGround) { SoundFactory.Instance.CreateJumpSmallSound(); } MarioPhysics.Jump(); MarioAnimatedState.Up(); MarioPhysics.IsGround = false; } }
public void Draw(SpriteBatch spriteBatch) { MarioAnimatedState.Draw(spriteBatch, MarioPhysics.Position); }