Show / Hide Table of Contents

Class EntityBehaviour

Represents the behaviour of an entity.

Mostly this handles the logic system.

Inheritance
Object
EntityBehaviour
Namespace: Modding.Levels
Assembly: Assembly-CSharp.dll
Syntax
public class EntityBehaviour

Properties

Entity

The entity associated with this behaviour.

Declaration
public Entity Entity { get; }
Property Value
Type Description
Entity

HasLogic

Whether this entity has any logic chains set up.

Declaration
public bool HasLogic { get; }
Property Value
Type Description
Boolean

HasRunningLogic

Whether this entity has any logic chains currently running.

Declaration
public bool HasRunningLogic { get; }
Property Value
Type Description
Boolean

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
Type Description
ReadOnlyCollection<LogicChain>

RunningLogicChains

The LogicChains that are currently running.

Declaration
public ReadOnlyCollection<LogicChain> RunningLogicChains { get; }
Property Value
Type Description
ReadOnlyCollection<LogicChain>

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
Type Description
Dictionary<String, Single>

Methods

Activate()

Activate this entity.

Declaration
public void Activate()

Deactivate()

Deactivate this entity.

Declaration
public void Deactivate()

Equals(EntityBehaviour)

Declaration
protected bool Equals(EntityBehaviour other)
Parameters
Type Name Description
EntityBehaviour other
Returns
Type Description
Boolean

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
Object obj
Returns
Type Description
Boolean
Overrides
Object.Equals(Object)

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
Int32
Overrides
Object.GetHashCode()

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
Type Name Description
String name
Single value

ToString()

Declaration
public override string ToString()
Returns
Type Description
String
Overrides
Object.ToString()

TriggerLogicChains(LogicChain)

Start all logic chains with the same trigger as the specified chain.

Declaration
public void TriggerLogicChains(LogicChain chain)
Parameters
Type Name Description
LogicChain chain

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
Type Name Description
EntityBehaviour left
EntityBehaviour right
Returns
Type Description
Boolean

Inequality(EntityBehaviour, EntityBehaviour)

Declaration
public static bool operator !=(EntityBehaviour left, EntityBehaviour right)
Parameters
Type Name Description
EntityBehaviour left
EntityBehaviour right
Returns
Type Description
Boolean
Back to top Generated by DocFX