private void MoveDirection(playerdirection direction, GameTime gameTime)
        {
            //animates the ships left and right movement so that it leans
            //according to the direction
            timeSinceLastFrame += gameTime.ElapsedGameTime.Milliseconds;
            if (timeSinceLastFrame > millisecondsPerFrame)
            {
                timeSinceLastFrame = 0;
                switch (direction)
                {
                case playerdirection.left:
                    --currentFrame;
                    if (currentFrame <= 0)
                    {
                        currentFrame = 0;
                    }
                    break;

                case playerdirection.right:
                    ++currentFrame;
                    if (currentFrame >= 12)
                    {
                        currentFrame = 12;
                    }
                    break;

                case playerdirection.stop:
                    if (currentFrame > 6)
                    {
                        --currentFrame;
                    }
                    else if (currentFrame < 6)
                    {
                        ++currentFrame;
                    }
                    break;
                }
            }
        }
        private void MoveDirection(playerdirection direction, GameTime gameTime)
        {
            //animates the ships left and right movement so that it leans
            //according to the direction
            timeSinceLastFrame += gameTime.ElapsedGameTime.Milliseconds;
            if (timeSinceLastFrame > millisecondsPerFrame)
            {
                timeSinceLastFrame = 0;
                switch (direction)
                {
                    case playerdirection.left:
                        --currentFrame;
                        if (currentFrame <= 0)
                            currentFrame = 0;
                        break;
                    case playerdirection.right:
                        ++currentFrame;
                        if (currentFrame >= 12)
                            currentFrame = 12;
                        break;
                    case playerdirection.stop:
                        if (currentFrame > 6)
                            --currentFrame;
                        else if (currentFrame < 6)
                            ++currentFrame;
                        break;
                }

            }
        }