3 ms·
Using Alice 2.2 (which also doesn't allow cloning/instantiation) my students had a similar issue, and solved it by using what they called "Megaman logic". Mega
by pflats 13y ago
Using Alice 2.2 (which also doesn't allow cloning/instantiation) my students had a similar issue, and solved it by using what they called "Megaman logic".
Megaman could apparently only shoot N bullets at once (3 or 5, I forget). Thus, they only ever had 5 bullet objects, iterated through a list to see if the bullet was shot or not, and only let you fire if there was a spare bullet.
I thought it was very clever. Sounds like you did much of the same thing.
- dpritchett 13y agoJust so! I had three projectiles (rock1, rock2, rock3) and they shared a global "fire selector" that operated as a sort of mutex. https://www.evernote.com/shard/s4/sh/90b814fd-df52-4fcf-9127-8d0e5ed4d448/29f131d569ece22e606957b4f7c946ea https://www.evernote.com/shard/s4/sh/90b814fd-df52-4fcf-9127...