SHARE
TWEET

Podpalenie

a guest Dec 6th, 2019 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if((event.type == sf::Event::KeyReleased)&&(event.key.code == sf::Keyboard::X))
  2.         {
  3.             SFMLHandling::setFire();
  4.         }
  5.  
  6. void SFMLHandling::setFire()
  7. {
  8.     unsigned x = rand()%s;
  9.     unsigned y = rand()%s;
  10.     if(arena(x,y).getCurrState() != field::BURNING && arena(x,y).getCurrState() != field::ROCK && arena(x,y).getCurrState() != field::BURNT && arena(x,y).getCurrState() != field::BURNING2)
  11.         arena(x,y).setCurrState(field::states::BURNING);
  12.     else
  13.         setFire();
  14. }
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