Class Health
Adds a health system to anything.
This does not need to be on a character. You can add this to a crate or anything that wants to be damaged. There are checks in do stuff for character specific objects if you want to.
Inheritance
System.Object
Health
Namespace: SF
Assembly: cs.temp.dll.dll
Syntax
public class Health : MonoBehaviour, IDamagable
Fields
CommandController
Declaration
public CommandController CommandController
Field Value
CurrentHealth
Declaration
Field Value
| Type |
Description |
| System.Int32 |
|
DeathAnimationHash
Declaration
public readonly int DeathAnimationHash
Field Value
| Type |
Description |
| System.Int32 |
|
DeathAnimationName
Declaration
public const string DeathAnimationName = "Death"
Field Value
| Type |
Description |
| System.String |
|
HitAnimationDuration
Declaration
public float HitAnimationDuration
Field Value
| Type |
Description |
| System.Single |
|
HitAnimationHash
Declaration
public readonly int HitAnimationHash
Field Value
| Type |
Description |
| System.Int32 |
|
HitAnimationName
Declaration
public const string HitAnimationName = "Damaged"
Field Value
| Type |
Description |
| System.String |
|
MaxHealth
Declaration
Field Value
| Type |
Description |
| System.Int32 |
|
SpawnPoint
Declaration
public CheckPointManager SpawnPoint
Field Value
| Type |
Description |
| CheckPointManager |
|
Methods
InstantKill()
Declaration
public virtual void InstantKill()
Kill()
Declaration
protected virtual void Kill()
OnDisable()
Declaration
protected void OnDisable()
OnEnable()
Declaration
protected void OnEnable()
OnEvent(RespawnEvent)
Declaration
public void OnEvent(RespawnEvent respawnEvent)
Parameters
| Type |
Name |
Description |
| RespawnEvent |
respawnEvent |
|
Respawn()
Declaration
TakeDamage(Int32)
Declaration
public virtual void TakeDamage(int damage)
Parameters
| Type |
Name |
Description |
| System.Int32 |
damage |
|
Implements