Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void SonicSprite::CalculateMovementSpeed(double deltaTime)
- {
- if (GAME_ENGINE->IsKeyboardKeyDown(VK_RIGHT) || GAME_ENGINE->IsKeyboardKeyDown(VK_LEFT))
- {
- m_SonicVelocity += SPEED_UP_AMOUNT;
- }
- if (!GAME_ENGINE->IsKeyboardKeyDown(VK_RIGHT) || !GAME_ENGINE->IsKeyboardKeyDown(VK_LEFT) && m_SonicVelocity > 0)
- {
- m_SonicVelocity -= SPEED_UP_AMOUNT;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement