SHARE
TWEET

asdasd

a guest May 25th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Clock clock;
  2.    
  3.         float pos = 10;
  4.         sf::View view(sf::FloatRect(std::rand() % 50, (std::rand() + 1) % 50, 1200, 630));
  5.  
  6.         if (SCREEN_SHAKE == true) {
  7.             pos = (std::rand() + 10 % 10, 10);
  8.        
  9.  
  10.         } if (SCREEN_SHAKE == false) {
  11.  
  12.             view.setCenter(1200 / 2, 630 / 2);
  13.  
  14.         }
  15.         if (SCREEN_SHAKE == true) {
  16.  
  17.             if (clock.getElapsedTime().asSeconds() < 1) {
  18.  
  19.                 SCREEN_SHAKE = false;
  20.  
  21.             }
  22.  
  23.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top