Class Entity
Character class of the game. Provides an interface for health/damage system. Entities will be disabled
when their health goes down to or below 0.
Inherited Members
Component.GetComponentInChildren<T>()
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DestroyObject(Object)
Assembly: LobsterFramework.dll
Syntax
[AddComponentMenu("Entity")]
public class Entity : MonoBehaviour
Fields
|
Improve this Doc
View Source
onDamaged
Declaration
public UnityAction<Damage> onDamaged
Field Value
|
Improve this Doc
View Source
onPostureStatusChange
Declaration
public UnityAction<bool> onPostureStatusChange
Field Value
Properties
|
Improve this Doc
View Source
Health
Declaration
public float Health { get; }
Property Value
|
Improve this Doc
View Source
IsDead
Declaration
public bool IsDead { get; }
Property Value
|
Improve this Doc
View Source
LatestDamageInfo
Declaration
public Damage LatestDamageInfo { get; }
Property Value
|
Improve this Doc
View Source
MaxHealth
Declaration
public float MaxHealth { get; }
Property Value
|
Improve this Doc
View Source
MaxPosture
Declaration
public float MaxPosture { get; }
Property Value
|
Improve this Doc
View Source
Posture
Declaration
public float Posture { get; }
Property Value
|
Improve this Doc
View Source
PostureBroken
Declaration
public bool PostureBroken { get; }
Property Value
|
Improve this Doc
View Source
RegenSuppressed
Declaration
public bool RegenSuppressed { get; }
Property Value
Methods
|
Improve this Doc
View Source
Damage(Damage)
Declaration
public void Damage(Damage damage)
Parameters
Type |
Name |
Description |
Damage |
damage |
|
|
Improve this Doc
View Source
Damage(float, float, Entity, DamageType)
Add damage to the entity, the damage will be dealt on update of next frame
Declaration
public void Damage(float health, float posture, Entity source = null, DamageType type = DamageType.General)
Parameters
Type |
Name |
Description |
float |
health |
The amount of health damage
|
float |
posture |
The amount of posture damage
|
Entity |
source |
The source of this attack
|
DamageType |
type |
The type of the damage
|
|
Improve this Doc
View Source
Defense(Damage)
Add a flat damage reduction to the entity, the damage taken will be reduced by the specified amount on update of next frame
Declaration
public void Defense(Damage defense)
Parameters
Type |
Name |
Description |
Damage |
defense |
|
|
Improve this Doc
View Source
Heal(Damage)
Declaration
public void Heal(Damage heal)
Parameters
Type |
Name |
Description |
Damage |
heal |
|
|
Improve this Doc
View Source
ResetStatus()
Reset the entity to its full health and posture and clear all of the damage and effects
Declaration
public void ResetStatus()