Hallo everybody,
at the end of a game, all sprites should vanish so I can restart it. I have tried sprite.MarkedForDelete= True and so ,but it deletes only just one sprite. Any idea ?
Thanks
VoDB
Timer1.Enabled = False ' stop any "Tick" timers
gw.Dispose
AddObject("gw", "GameWindow")
gw.New1("Form1",0,0,Form1.Width,form1.Height-25) 'Create the GameWindow control.
... ' rest of initialisation like when first started
Although you can get away with doing that I would suggest that it is not good practice. I would recommend that you abstract the stuff that is needed to be re-run into a separate Sub and call that Sub from App_Start and your restart code leaving only the real one-time stuff in App_Start.