Class SUHealthBarLinkData
Inheritance
SUHealthBarLinkData
Assembly: cs.temp.dll.dll
Syntax
[Serializable]
public class SUHealthBarLinkData : SULinkData
Constructors
SUHealthBarLinkData()
Declaration
public SUHealthBarLinkData()
Declaration
public SUHealthBarLinkData(Transform target, List<SUHealthBarData> allData, float hp, float mp = 0F, float mpReload = 15F, float mpBarDuration = 0.15F, float damageBarDuration = 0.5F, float damageBarDelay = 0.25F, float hpFor10Lines = 100F)
Parameters
Properties
AllData
Declaration
public List<SUHealthBarData> AllData { get; }
Property Value
CurrentHp
Declaration
public float CurrentHp { get; set; }
Property Value
CurrentMp
Declaration
public float CurrentMp { get; }
Property Value
HasFullHp
Declaration
public bool HasFullHp { get; }
Property Value
HasFullMp
Declaration
public bool HasFullMp { get; }
Property Value
HasNoHp
Declaration
public bool HasNoHp { get; }
Property Value
HasNoMp
Declaration
public bool HasNoMp { get; }
Property Value
IsEmpty
Declaration
public bool IsEmpty { get; }
Property Value
Methods
AddHp(Single)
Call this when you're adding an armor or item that gives extra hp to the player
Declaration
public void AddHp(float hp)
Parameters
Type |
Name |
Description |
Single |
hp |
Amount of Hp to add
|
AddMp(Single)
Declaration
public void AddMp(float mp)
Parameters
Type |
Name |
Description |
Single |
mp |
|
DamageHp(Single)
Apply damage to the health points
Declaration
public void DamageHp(float damage)
Parameters
Type |
Name |
Description |
Single |
damage |
|
HasEnoughMp(Single)
Declaration
public bool HasEnoughMp(float mpCost)
Parameters
Type |
Name |
Description |
Single |
mpCost |
|
Returns
HealHp(Single)
Call this when the player takes an health potion
Declaration
public void HealHp(float hp)
Parameters
Type |
Name |
Description |
Single |
hp |
Amount of Hp to heal
|
RemoveHp(Single)
Call this when you're removing an armor or item that gives extra hp to the player
Declaration
public void RemoveHp(float hp)
Parameters
Type |
Name |
Description |
Single |
hp |
Amount of Hp to remove
|
RemoveMp(Single)
Declaration
public void RemoveMp(float mp)
Parameters
Type |
Name |
Description |
Single |
mp |
|
Restart()
Call this when the character/enemy has respawned after a death.
The bar will refill and reset its values to the starting ones
Declaration
StartFollow()
Make all indicators of this linkData start following the target
Declaration
public void StartFollow()
StopFollow()
Stop and destroy all indicators of this linkData
Declaration
UseMP(Single)
Declaration
public void UseMP(float mp)
Parameters
Type |
Name |
Description |
Single |
mp |
|