I’ve a problem that I think should be quite simple but I can’t figure out how to do it and wondered if anyone could point me in the right direction. I’m creating a space shooter game and during the game the player can deploy a shield. The shield dissolves once it’s taken 5 hits. I wanted to indicate how much shield strength was left by stacking five shield icons (using GUITextures) on the screen and deleting one every time a hit on the shield occurs. Creating a list of GUITextures is easy enough, as is the principle of deleting them as the shield takes hits, but I’m then at a loss as to how to get them to display on the screen. I’d rather use relative positions than pixel insets if possible.
Has anyone else tried something like this? If so, do you have a snippet of example C# code?
Actually that solution of positioning them on the screen then enabling and disabling the GUITexture as needed sounds just about perfect. It removes all the painful business of trying to instantiate and scale at a certain position. I’ll give it a go and post on how it turns out. Thanks for the help Suddoha!