Thank you very much, QuietBloke. :) You totally understand what I was trying to do with the types. Only one difference. I wanted the simplest kind of sprite to be a stationary background element, so there would be no need for it to have an update method. Hmmm... Or should I just use a DrawImage(image,x,y) with no associated type at all in that case?
The one thing I don't understand is, how can I dynamically load images and give them variable names by reading them from a text file? Shouldn't that theoretically have the same problems as loading the image names dynamically from an array? (I.E. the problem being that Blitz doesn't support using a string as a variable name?) Or is that what the number in [brackets] is for after imageEnemies?
Do you think I could trouble you to write the loadImages()
function the way you would if you wanted to grab those image names from a txt file? I want to understand how the variable names get set.
The one thing I don't understand is, how can I dynamically load images and give them variable names by reading them from a text file? Shouldn't that theoretically have the same problems as loading the image names dynamically from an array? (I.E. the problem being that Blitz doesn't support using a string as a variable name?) Or is that what the number in [brackets] is for after imageEnemies?
Do you think I could trouble you to write the loadImages()
function the way you would if you wanted to grab those image names from a txt file? I want to understand how the variable names get set.