public override void Update(GameTime gameTime, InputManager input) { base.Update(gameTime, input); if (!throwing) { if (input.KeyDown(Keys.Right, Keys.D)) { velocity.X = horizontalSpeed; walkAnimation.isPaused = false; walkAnimation.flippedHorizontally = false; throwAnimation.flippedHorizontally = false; } else if (input.KeyDown(Keys.Left, Keys.A)) { velocity.X = -horizontalSpeed; walkAnimation.isPaused = false; walkAnimation.flippedHorizontally = true; throwAnimation.flippedHorizontally = true; } else { velocity.X = 0; walkAnimation.isPaused = true; } //running if (input.KeyDown(Keys.LeftShift)) { velocity.X *= 1.5f; } if (input.KeyDown(Keys.Space)) { throwing = true; throwAnimation.Start(); } if (input.KeyDown(Keys.Up)) { this.Jump(); } } else if (isOnGround()) { velocity.X = 0; } walkAnimation.Update(gameTime); throwAnimation.Update(gameTime); }
public override void Update(GameTime gameTime) { base.Update(gameTime); death.Update(gameTime); }
public override void Update(GameTime gameTime) { throwAnimation.Update(gameTime); }