Add this class to a GUI object, and it'll handle the instantiation and management of hearts based on the current lives of the player character It's best used on a HorizontalLayoutGroup that will handle correct positioning natively
More...
|
Sprite | HeartFull |
| the sprite to use when the heart is full More...
|
|
Sprite | HeartEmpty |
| the sprite to use when the heart is empty More...
|
|
Vector2 | HeartSize = new Vector2(50,50) |
| the size of the heart to display More...
|
|
int | HeartProvision = 10 |
| the number of hearts to provision (if you know you'll never have more than, say, 5 hearts in your game, set it to 5. More...
|
|
Add this class to a GUI object, and it'll handle the instantiation and management of hearts based on the current lives of the player character It's best used on a HorizontalLayoutGroup that will handle correct positioning natively
◆ DrawHearts()
virtual void MoreMountains.CorgiEngine.HeartsGUI.DrawHearts |
( |
| ) |
|
|
protectedvirtual |
Draws as many hearts as provisioned
◆ Initialization()
virtual void MoreMountains.CorgiEngine.HeartsGUI.Initialization |
( |
| ) |
|
|
protectedvirtual |
On Init we draw all our provision hearts
◆ Start()
virtual void MoreMountains.CorgiEngine.HeartsGUI.Start |
( |
| ) |
|
|
protectedvirtual |
On Start we initialize our hearts
◆ Update()
virtual void MoreMountains.CorgiEngine.HeartsGUI.Update |
( |
| ) |
|
|
protectedvirtual |
On Update we'll keep our hearts updated
◆ UpdateHearts()
virtual void MoreMountains.CorgiEngine.HeartsGUI.UpdateHearts |
( |
| ) |
|
|
protectedvirtual |
Every frame we make sure all our hearts are in the desired state
◆ HeartEmpty
Sprite MoreMountains.CorgiEngine.HeartsGUI.HeartEmpty |
the sprite to use when the heart is empty
◆ HeartFull
Sprite MoreMountains.CorgiEngine.HeartsGUI.HeartFull |
the sprite to use when the heart is full
◆ HeartProvision
int MoreMountains.CorgiEngine.HeartsGUI.HeartProvision = 10 |
the number of hearts to provision (if you know you'll never have more than, say, 5 hearts in your game, set it to 5.
◆ Hearts
List<Image> MoreMountains.CorgiEngine.HeartsGUI.Hearts |
|
protected |
◆ HeartSize
Vector2 MoreMountains.CorgiEngine.HeartsGUI.HeartSize = new Vector2(50,50) |
the size of the heart to display
The documentation for this class was generated from the following file: