Class Entity
Assembly: Assembly-CSharp.dll
Syntax
Properties
Behaviour
The behaviour associated with this entity.
This mostly handles the logic system.
Declaration
public EntityBehaviour Behaviour { get; }
Property Value
BuildEntity
A reference to the building mode version of this entity.
Declaration
public Entity BuildEntity { get; }
Property Value
GameObject
GameObject of this entity.
Declaration
public GameObject GameObject { get; }
Property Value
Type |
Description |
UnityEngine.GameObject |
|
Id
Unique identifier of this entity.
This is the same for the building mode entity and its simulation clone.
Declaration
Property Value
InternalObject
Internal representation of this object.
WARNING: This is not part of the stable API and subject to change!
Declaration
public LevelEntity InternalObject { get; }
Property Value
Type |
Description |
LevelEntity |
|
IsBuildZone
Whether this entity is a build zone.
Declaration
public bool IsBuildZone { get; }
Property Value
IsBurning
Whether this entity is currently burning.
Declaration
public bool IsBurning { get; }
Property Value
IsDestroyed
Whether this entity was destroyed.
Declaration
public bool IsDestroyed { get; }
Property Value
IsSelected
Whether this entity is selected by the local player.
Declaration
public bool IsSelected { get; }
Property Value
Name
Name of this entity.
The prefab name by default, or a custom name set in the BlockMapper.
Declaration
public string Name { get; set; }
Property Value
PhysicsEnabled
Whether this entity has its physics enabled.
Declaration
public bool PhysicsEnabled { get; }
Property Value
Prefab
The prefab / type of this entity.
Declaration
public EntityPrefabInfo Prefab { get; }
Property Value
SimEntity
A reference to the simulation clone of this entity.
Null in building mode.
Note that building zones do not have simulation clones,
SimEntity is always null for them.
Declaration
public Entity SimEntity { get; }
Property Value
Methods
Equals(Entity)
Declaration
protected bool Equals(Entity other)
Parameters
Type |
Name |
Description |
Entity |
other |
|
Returns
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
Overrides
From(LevelEntity)
Create an Entity from its internal representation.
Declaration
public static Entity From(LevelEntity levelEntity)
Parameters
Type |
Name |
Description |
LevelEntity |
levelEntity |
|
Returns
From(Int64)
Create an Entity object from its id.
Declaration
public static Entity From(long id)
Parameters
Type |
Name |
Description |
Int64 |
id |
|
Returns
From(GameObject)
Create an Entity object from its GameObject.
Declaration
public static Entity From(GameObject entityObject)
Parameters
Type |
Name |
Description |
UnityEngine.GameObject |
entityObject |
|
Returns
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
Select(Boolean)
Marks the entity as selected for the local user.
Note that this does not actually select the entity for any of the normal tools,
it just adds the visual effect.
Declaration
public void Select(bool selected)
Parameters
Type |
Name |
Description |
Boolean |
selected |
|
SetOnFire(Boolean)
Set the on fire state of this entity.
No-op if the entity cannot burn.
Declaration
public void SetOnFire(bool onFire)
Parameters
Type |
Name |
Description |
Boolean |
onFire |
|
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
Equality(Entity, Entity)
Declaration
public static bool operator ==(Entity left, Entity right)
Parameters
Returns
Inequality(Entity, Entity)
Declaration
public static bool operator !=(Entity left, Entity right)
Parameters
Returns