C# Class CryEngine.Entity

Represents an entity created via CryMono.
Inheritance: EntityBase
Show file Open project: PoppermostProductions/CryMono

Public Methods

Method Description
GetEditorType ( Type type, EditorPropertyType propertyType ) : EditorPropertyType
GetHashCode ( ) : int
InvalidateTrigger ( ) : void

Invalidate the TriggerBounds, so it gets recalculated and catches things which are already inside when it gets enabled.

OnPostSpawn ( object args ) : void

Called after spawning, with the parameters supplied to Entity.Spawn.

OnSpawn ( ) : void

This callback is called when this entity has spawned. The entity has been created and added to the list of entities. Some functionality is not yet available at the point this method is called. For all game object interactions, use OnPostSpawn.

Protected Methods

Method Description
OnAttach ( CryEngine.EntityId child ) : void

Called whenever another entity has been linked to this entity.

OnCollision ( ColliderInfo source, ColliderInfo target, Vec3 hitPos, Vec3 contactNormal, float penetration, float radius ) : void

Sent on entity collision.

OnDetach ( CryEngine.EntityId child ) : void

Called whenever another entity has been unlinked from this entity.

OnDetachThis ( CryEngine.EntityId parent ) : void

Called whenever this entity is unliked from another entity.

OnEditorReset ( bool enteringGame ) : void

Called when resetting the state of the entity in Editor.

OnEnterArea ( CryEngine.EntityId entityId, int areaId, CryEngine.EntityId areaEntityId ) : void

Sent when entity enters to the area proximity.

OnEnterNearArea ( CryEngine.EntityId entityId, int areaId, CryEngine.EntityId areaEntityId ) : void
OnLeaveArea ( CryEngine.EntityId entityId, int areaId, CryEngine.EntityId areaEntityId ) : void

Sent when entity leaves the area proximity.

OnLeaveNearArea ( CryEngine.EntityId entityId, int areaId, CryEngine.EntityId areaEntityId ) : void
OnLevelLoaded ( ) : void

Called after level has been loaded, is not called on serialization. Note that this is called prior to GameRules.OnClientConnect and OnClientEnteredGame!

OnMove ( EntityMoveFlags moveFlags ) : void

Called when the entities local or world transformation matrix changes. (Position / Rotation / Scale)

OnMoveInsideArea ( CryEngine.EntityId entityId, int areaId, CryEngine.EntityId areaEntityId ) : void

Sent when entity moves inside the area proximity.

OnMoveNearArea ( CryEngine.EntityId entityId, int areaId, CryEngine.EntityId areaEntityId, float fade ) : void
OnPostUpdate ( ) : void
OnPrePhysicsUpdate ( ) : void
OnPropertyChanged ( MemberInfo memberInfo, EditorPropertyType propertyType, object newValue ) : void

Called when the user changes a property from within the Editor.

OnRemove ( ) : bool

Called when the entity is being removed.

OnStartGame ( ) : void

Called when game is started (games may start multiple times)

OnStartLevel ( ) : void

Called when the level is started.

PostSerialize ( ) : void

Private Methods

Method Description
FullSerialize ( Serialization serialize ) : void
GetPropertyValue ( string propertyName ) : string
InternalFullSerialize ( Serialization serialize ) : void
InternalInitialize ( IScriptInitializationParams initParams ) : bool

Initializes the entity, not recommended to set manually.

InternalNetSerialize ( Serialization serialize, int aspect, byte profile, int flags ) : void
NetSerialize ( Serialization serialize, int aspect, byte profile, int flags ) : void
OnAnimationEvent ( AnimationEvent animEvent ) : void
SetPropertyValue ( string propertyName, EditorPropertyType propertyType, string valueString ) : void

Method Details

GetEditorType() public static method

public static GetEditorType ( Type type, EditorPropertyType propertyType ) : EditorPropertyType
type System.Type
propertyType EditorPropertyType
return EditorPropertyType

GetHashCode() public method

public GetHashCode ( ) : int
return int

InvalidateTrigger() public method

Invalidate the TriggerBounds, so it gets recalculated and catches things which are already inside when it gets enabled.
public InvalidateTrigger ( ) : void
return void

OnAttach() protected method

Called whenever another entity has been linked to this entity.
protected OnAttach ( CryEngine.EntityId child ) : void
child CryEngine.EntityId
return void

OnCollision() protected method

Sent on entity collision.
protected OnCollision ( ColliderInfo source, ColliderInfo target, Vec3 hitPos, Vec3 contactNormal, float penetration, float radius ) : void
source ColliderInfo
target ColliderInfo
hitPos Vec3
contactNormal Vec3
penetration float
radius float
return void

OnDetach() protected method

Called whenever another entity has been unlinked from this entity.
protected OnDetach ( CryEngine.EntityId child ) : void
child CryEngine.EntityId
return void

OnDetachThis() protected method

Called whenever this entity is unliked from another entity.
protected OnDetachThis ( CryEngine.EntityId parent ) : void
parent CryEngine.EntityId
return void

OnEditorReset() protected method

Called when resetting the state of the entity in Editor.
protected OnEditorReset ( bool enteringGame ) : void
enteringGame bool true if currently entering gamemode, false if exiting.
return void

OnEnterArea() protected method

Sent when entity enters to the area proximity.
protected OnEnterArea ( CryEngine.EntityId entityId, int areaId, CryEngine.EntityId areaEntityId ) : void
entityId CryEngine.EntityId
areaId int
areaEntityId CryEngine.EntityId
return void

OnEnterNearArea() protected method

protected OnEnterNearArea ( CryEngine.EntityId entityId, int areaId, CryEngine.EntityId areaEntityId ) : void
entityId CryEngine.EntityId
areaId int
areaEntityId CryEngine.EntityId
return void

OnLeaveArea() protected method

Sent when entity leaves the area proximity.
protected OnLeaveArea ( CryEngine.EntityId entityId, int areaId, CryEngine.EntityId areaEntityId ) : void
entityId CryEngine.EntityId
areaId int
areaEntityId CryEngine.EntityId
return void

OnLeaveNearArea() protected method

protected OnLeaveNearArea ( CryEngine.EntityId entityId, int areaId, CryEngine.EntityId areaEntityId ) : void
entityId CryEngine.EntityId
areaId int
areaEntityId CryEngine.EntityId
return void

OnLevelLoaded() protected method

Called after level has been loaded, is not called on serialization. Note that this is called prior to GameRules.OnClientConnect and OnClientEnteredGame!
protected OnLevelLoaded ( ) : void
return void

OnMove() protected method

Called when the entities local or world transformation matrix changes. (Position / Rotation / Scale)
protected OnMove ( EntityMoveFlags moveFlags ) : void
moveFlags EntityMoveFlags
return void

OnMoveInsideArea() protected method

Sent when entity moves inside the area proximity.
protected OnMoveInsideArea ( CryEngine.EntityId entityId, int areaId, CryEngine.EntityId areaEntityId ) : void
entityId CryEngine.EntityId
areaId int
areaEntityId CryEngine.EntityId
return void

OnMoveNearArea() protected method

protected OnMoveNearArea ( CryEngine.EntityId entityId, int areaId, CryEngine.EntityId areaEntityId, float fade ) : void
entityId CryEngine.EntityId
areaId int
areaEntityId CryEngine.EntityId
fade float
return void

OnPostSpawn() public method

Called after spawning, with the parameters supplied to Entity.Spawn.
public OnPostSpawn ( object args ) : void
args object
return void

OnPostUpdate() protected method

protected OnPostUpdate ( ) : void
return void

OnPrePhysicsUpdate() protected method

protected OnPrePhysicsUpdate ( ) : void
return void

OnPropertyChanged() protected method

Called when the user changes a property from within the Editor.
protected OnPropertyChanged ( MemberInfo memberInfo, EditorPropertyType propertyType, object newValue ) : void
memberInfo System.Reflection.MemberInfo
propertyType EditorPropertyType
newValue object
return void

OnRemove() protected method

Called when the entity is being removed.
protected OnRemove ( ) : bool
return bool

OnSpawn() public method

This callback is called when this entity has spawned. The entity has been created and added to the list of entities. Some functionality is not yet available at the point this method is called. For all game object interactions, use OnPostSpawn.
public OnSpawn ( ) : void
return void

OnStartGame() protected method

Called when game is started (games may start multiple times)
protected OnStartGame ( ) : void
return void

OnStartLevel() protected method

Called when the level is started.
protected OnStartLevel ( ) : void
return void

PostSerialize() protected method

protected PostSerialize ( ) : void
return void