Its a list of projectiles. Now the plot thickens, however:
I did a simple test:
1) I modified Projectile so that it doesn't extend GameObject
2) I created a new projectile
3) I called myProj.update(.5) and nothing happened! It doesn't call the update!
Now I'm really freaking out, I can't figure out why that would be!
Update never gets called! argh, this is freaking me out!
I did a simple test:
1) I modified Projectile so that it doesn't extend GameObject
2) I created a new projectile
3) I called myProj.update(.5) and nothing happened! It doesn't call the update!
Now I'm really freaking out, I can't figure out why that would be!
Import "Code/Includes.bmx" GameData.current = New Gamedata GameData.current.loadGameData("Data/DataManifest.txt") Graphics 1680, 1050 Pip:projectileInfo = GameData.current.projectileInfoNamed("Gatling Laser") np:projectile = projectile.create:projectile(pip, 0, 0, 0, MouseX(), MouseY(), 0) Global deltaT#, lasttime = MilliSecs() While Not(KeyHit(key_escape)) deltaT = (MilliSecs() - lasttime)*.001; lasttime = MilliSecs() If MouseHit(1) Then Pip:projectileInfo = GameData.current.projectileInfoNamed("Gatling Laser") np:projectile = projectile.create:projectile(pip, 0, 0, 0, MouseX(), MouseY(), 0) End If np.update(DeltaT) np.draw() Flip; Cls; Wend
Update never gets called! argh, this is freaking me out!