public override void Update(GameTime gameTime, BaseLevel level) { base.Update(gameTime, level); MouseState mouseState = Mouse.GetState(); if (Utility.isMouseLeftButtonClicked(mouseState, _prevMouseState) && CanChangeAnimation()) { Bullet firedBullet = shoot( elapsedMs: gameTime.TotalGameTime.TotalMilliseconds, from: new Vector2(CollisionRectangle.X + CollisionRectangle.Width, CollisionRectangle.Y), direction: _movement.Direction ); if (firedBullet != null) { _movement.Action = MovementAction.SHOOT; } level.AddFiredShot(firedBullet); } _prevMouseState = mouseState; }