Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualLewisDe

Posted 06 May 2013 - 05:20 AM

I have a bunny who shoots bullets. To ensure that resources aren't being depleted, the game erases that bullet from a vector of bullets when the bullet comes off the screen (when its x value is less than zero). However, whenever the game erases the obsolete bullet, the game ends abruptly. I think this problem has something to do with when the sprite resources are freed. Can anyone please help... sad.png

 

Code: http://pastebin.com/wG6rRqa8

 

The key lines to acknowledge are lines 441 and the projectile class


#1LewisDe

Posted 06 May 2013 - 05:18 AM

I have a bunny who shoots bullets. To ensure that resources aren't being depleted, the game erases that bullet from a vector of bullets when the bullet comes off the screen (when its x value is less than zero). However, whenever the game erases the obsolete bullet, the game ends abruptly. I think this problem has something to do with when the sprite resources are freed. Can anyone please help... sad.png

 

Code: http://pastebin.com/jm8AwGC8

 

The key lines to acknowledge are lines 441 and the projectile class


PARTNERS