Class BasicHealthManager
Inheritance
BasicHealthManager
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: NeoFPS.dll
Syntax
public class BasicHealthManager : MonoBehaviour, IHealthManager, IMonoBehaviour, INeoSerializableComponent
Properties
health
Declaration
public float health { get; set; }
Property Value
| Type |
Description |
| System.Single |
|
healthMax
Declaration
public float healthMax { get; set; }
Property Value
| Type |
Description |
| System.Single |
|
invincible
Declaration
public bool invincible { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
isAlive
Declaration
public bool isAlive { get; protected set; }
Property Value
| Type |
Description |
| System.Boolean |
|
normalisedHealth
Declaration
public float normalisedHealth { get; set; }
Property Value
| Type |
Description |
| System.Single |
|
Methods
AddDamage(Single)
Declaration
public virtual void AddDamage(float damage)
Parameters
| Type |
Name |
Description |
| System.Single |
damage |
|
AddDamage(Single, IDamageSource)
Declaration
public virtual void AddDamage(float damage, IDamageSource source)
Parameters
AddDamage(Single, Boolean)
Declaration
public virtual void AddDamage(float damage, bool critical)
Parameters
| Type |
Name |
Description |
| System.Single |
damage |
|
| System.Boolean |
critical |
|
AddDamage(Single, Boolean, IDamageSource)
Declaration
public virtual void AddDamage(float damage, bool critical, IDamageSource source)
Parameters
| Type |
Name |
Description |
| System.Single |
damage |
|
| System.Boolean |
critical |
|
| IDamageSource |
source |
|
AddDamage(Single, Boolean, IDamageSource, RaycastHit)
Declaration
public void AddDamage(float damage, bool critical, IDamageSource source, RaycastHit hit)
Parameters
| Type |
Name |
Description |
| System.Single |
damage |
|
| System.Boolean |
critical |
|
| IDamageSource |
source |
|
| RaycastHit |
hit |
|
AddDamage(Single, Boolean, RaycastHit)
Declaration
public void AddDamage(float damage, bool critical, RaycastHit hit)
Parameters
| Type |
Name |
Description |
| System.Single |
damage |
|
| System.Boolean |
critical |
|
| RaycastHit |
hit |
|
AddHealth(Single)
Declaration
public virtual void AddHealth(float h)
Parameters
| Type |
Name |
Description |
| System.Single |
h |
|
AddHealth(Single, IDamageSource)
Declaration
public virtual void AddHealth(float h, IDamageSource source)
Parameters
Awake()
Declaration
protected virtual void Awake()
CheckDamageSource(IDamageSource)
Declaration
protected virtual bool CheckDamageSource(IDamageSource source)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
OnDestroy()
Declaration
protected virtual void OnDestroy()
OnHealthChanged(Single, Single, Boolean, IDamageSource)
Declaration
protected virtual void OnHealthChanged(float from, float to, bool critical, IDamageSource source)
Parameters
| Type |
Name |
Description |
| System.Single |
from |
|
| System.Single |
to |
|
| System.Boolean |
critical |
|
| IDamageSource |
source |
|
OnIsAliveChanged()
Declaration
protected virtual void OnIsAliveChanged()
OnMaxHealthChanged(Single, Single)
Declaration
protected virtual void OnMaxHealthChanged(float from, float to)
Parameters
| Type |
Name |
Description |
| System.Single |
from |
|
| System.Single |
to |
|
OnValidate()
Declaration
protected virtual void OnValidate()
ReadProperties(INeoDeserializer, NeoSerializedGameObject)
Declaration
public virtual void ReadProperties(INeoDeserializer reader, NeoSerializedGameObject nsgo)
Parameters
SetHealth(Single, Boolean, IDamageSource)
Declaration
public void SetHealth(float h, bool critical, IDamageSource source)
Parameters
| Type |
Name |
Description |
| System.Single |
h |
|
| System.Boolean |
critical |
|
| IDamageSource |
source |
|
SetHealthSilent(Single)
Declaration
public virtual void SetHealthSilent(float h)
Parameters
| Type |
Name |
Description |
| System.Single |
h |
|
SetNormalisedHealthSilent(Single)
Declaration
public virtual void SetNormalisedHealthSilent(float h)
Parameters
| Type |
Name |
Description |
| System.Single |
h |
|
WriteProperties(INeoSerializer, NeoSerializedGameObject, SaveMode)
Declaration
public virtual void WriteProperties(INeoSerializer writer, NeoSerializedGameObject nsgo, SaveMode saveMode)
Parameters
Events
onHealthChanged
Declaration
public event HealthDelegates.OnHealthChanged onHealthChanged
Event Type
onHealthMaxChanged
Declaration
public event HealthDelegates.OnHealthMaxChanged onHealthMaxChanged
Event Type
onIsAliveChanged
Declaration
public event HealthDelegates.OnIsAliveChanged onIsAliveChanged
Event Type
Implements