Class EntityBehaviour
Represents the behaviour of an entity.
Mostly this handles the logic system.
Inheritance
EntityBehaviour
Assembly: Assembly-CSharp.dll
Syntax
public class EntityBehaviour
Properties
Entity
The entity associated with this behaviour.
Declaration
public Entity Entity { get; }
Property Value
HasLogic
Whether this entity has any logic chains set up.
Declaration
public bool HasLogic { get; }
Property Value
HasRunningLogic
Whether this entity has any logic chains currently running.
Declaration
public bool HasRunningLogic { get; }
Property Value
InternalObject
The internal representation of this objet.
WARNING: This is not part of the stable API and subject to change!
Declaration
public GenericEntity InternalObject { get; }
Property Value
Type |
Description |
GenericEntity |
|
LogicChains
All LogicChains that are set up on this entity.
Declaration
public ReadOnlyCollection<LogicChain> LogicChains { get; }
Property Value
RunningLogicChains
The LogicChains that are currently running.
Declaration
public ReadOnlyCollection<LogicChain> RunningLogicChains { get; }
Property Value
Variables
All variables local to this entity.
Note: Variables can't be changes using this, use SetVariable for that.
Declaration
public Dictionary<string, float> Variables { get; }
Property Value
Methods
Activate()
Declaration
Deactivate()
Declaration
Equals(EntityBehaviour)
Declaration
protected bool Equals(EntityBehaviour other)
Parameters
Returns
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
SetVariable(String, Single)
Set a variable (that is local to this entity) to a new value.
Declaration
public void SetVariable(string name, float value)
Parameters
ToString()
Declaration
public override string ToString()
Returns
Overrides
TriggerLogicChains(LogicChain)
Start all logic chains with the same trigger as the specified chain.
Declaration
public void TriggerLogicChains(LogicChain chain)
Parameters
TriggerLogicChains(String)
Start all logic chains with the specified trigger.
Declaration
public void TriggerLogicChains(string triggerId)
Parameters
Type |
Name |
Description |
String |
triggerId |
|
Operators
Equality(EntityBehaviour, EntityBehaviour)
Declaration
public static bool operator ==(EntityBehaviour left, EntityBehaviour right)
Parameters
Returns
Inequality(EntityBehaviour, EntityBehaviour)
Declaration
public static bool operator !=(EntityBehaviour left, EntityBehaviour right)
Parameters
Returns