Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. void CharacterKoopa::MoveLeft(float deltaTime)
  2. {
  3.     mFacingDirection = FACING_LEFT;
  4.     if (!(mPosition.x < 0))
  5.     {
  6.         mPosition.x -= mMovementSpeed;
  7.     }
  8. }
  9.  
  10. void CharacterKoopa::MoveRight(float deltaTime)
  11. {
  12.     mFacingDirection = FACING_RIGHT;
  13.     if (!(mPosition.x + mSingleSpriteWidth > SCREEN_WIDTH))
  14.     {
  15.         mPosition.x += mMovementSpeed;
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement