The HUD is a bit special in libgeds in that the engine doesn't know what it is, nor what it does. All it knows is how to pass it informations, more in the LUA spirit (afaik).
so when you type
- hud.load "somefile.spr"
The other kind of command,
- hud.mode=menu
So the HUD is something that the advanced programmer sets up and that can interprete freely that string that is meant to be a filename. In other words, rather than hacking "let's show the score" when the 'show now' bit was passed, we could have a more explicit
- hud.show "chapter2.spr" // only while loading
- hud.show "+score"
- // all the level setup goes here
- hud.show "-score"
- hud.load "hud-basic.spr" // what goes on the bottom screen during one level.
No comments:
Post a Comment