Hello, I've recently been working on a hud, and I didnt want to write out the same methods over and over, so I'm trying to use
loop to draw out save some space, however I seem to be getting a small problem. Here's the code I used
for i in (0..4)
@background_image = Sprite.new
@background_image.bitmap = Bitmap.new(78,30)
@background_image.bitmap.fill_rect(0, 0, 78, 30, Color.new(0, 0, 0,128))
@background_image.x = NewHUD::HUD_X
@background_image.y = NewHUD::HUD_Y + (30 + 1) * i
@background_image.z = 1000
end
it works, for a few seconds, and then everything except the last iteration is deleted from the screen, I'm not sure why, hope someone could help explain this to me am I missing something here? I also tried
however the result is the same.