Game Framework
GameFramework.GameStructure.Players.Components.ShowHealthImage Class Reference

Show the health that a player has by updating the fill amount on an image. More...

Inheritance diagram for GameFramework.GameStructure.Players.Components.ShowHealthImage:
GameFramework.Messaging.Components.AbstractClasses.RunOnMessage< HealthChangedMessage >

Public Member Functions

override void Awake ()
 Get a reference to the attached image and cache for later use. More...
 
override void Start ()
 Cache player reference and call base class. More...
 
override bool RunMethod (HealthChangedMessage message)
 Update the attached imaged fill amount with the new health. More...
 

Public Attributes

Color HealthTintFull = Color.white
 A tint to apply to the attached image when the user has full health. More...
 
Color HealthTintEmpty = Color.white
 A tint to apply to the attached image when the user has no health left. More...
 

Detailed Description

Show the health that a player has by updating the fill amount on an image.

The referenced image should have it's image type set to filled. This component will also optionally lerps the image color between two values.

Member Function Documentation

override void GameFramework.GameStructure.Players.Components.ShowHealthImage.Awake ( )

Get a reference to the attached image and cache for later use.

override bool GameFramework.GameStructure.Players.Components.ShowHealthImage.RunMethod ( HealthChangedMessage  message)

Update the attached imaged fill amount with the new health.

Parameters
message
Returns
override void GameFramework.GameStructure.Players.Components.ShowHealthImage.Start ( )

Cache player reference and call base class.

Member Data Documentation

Color GameFramework.GameStructure.Players.Components.ShowHealthImage.HealthTintEmpty = Color.white

A tint to apply to the attached image when the user has no health left.

Color GameFramework.GameStructure.Players.Components.ShowHealthImage.HealthTintFull = Color.white

A tint to apply to the attached image when the user has full health.


The documentation for this class was generated from the following file: