View Single Post
Events
Old
chickentree
Super Moderator
 
Status: Offline
Posts: 250
Join Date: Dec 2012
Location: Frosno, Ca
Default Events - 12-17-2015, 02:03 PM

Quote:
Originally Posted by coynerm View Post
version Alice3:

I had to put a while loop in myFirstMethod() in order for the collision detection functions to detect/work. makes sense now that i think about it...keeps looping/scanning for collision events...right?

New problem: counter variable keeps incrementing b/c each collision is counted multiple times b/c its in a while loop. fixed this by moving object away so it doesnt multiple detect collision. is there a way to delete or remove an object from a running program upon collision? ie pirate ship collides w/ iceberg so iceberg is deleted/removed.

thx for any feedback.
Mike
A better approach might be to use an event rather than an infinite while loop.

Mark


Mark Henwood
mhenwood@ieee.org
   
Reply With Quote