Adding a Health Bar
by Do Not Delete · in Torque X 2D · 04/22/2007 (5:48 pm) · 4 replies
I'm following this and I was wondering which part of the code in Game.cs do I have to put the tutorial's code at.
About the author
#2
04/23/2007 (7:24 am)
I'm working with the TankBuster starter kit.
#3
04/24/2007 (9:09 am)
Can anyone help?
#4
Just drop a health sprite into the scene. And then write a component that will keep the health bar in visibility of the camera. Then write some code that makes sure the health bar's .Size property is propotional to your target objects "health" property.
it should be fairly simple. But if you can't do that, then I would recomend just trying to "use" the size property. Open up a starterkit and start messing around. See if you can assign different sizes to the GG logo.
04/24/2007 (2:20 pm)
You can't use that code.Just drop a health sprite into the scene. And then write a component that will keep the health bar in visibility of the camera. Then write some code that makes sure the health bar's .Size property is propotional to your target objects "health" property.
it should be fairly simple. But if you can't do that, then I would recomend just trying to "use" the size property. Open up a starterkit and start messing around. See if you can assign different sizes to the GG logo.
Torque Owner Matias Kiviniemi