C# Class idTech4.Game.idEntity

Inheritance: IDisposable
Show file Open project: iainmckay/idtech4.net Class Usage Examples

Public Properties

Property Type Description
IndexNone int

Protected Properties

Property Type Description
_renderEntity idTech4.Renderer.RenderEntityComponent
_renderModel idTech4.Renderer.idRenderEntity
_renderView idTech4.Renderer.idRenderView

Public Methods

Method Description
ActivatePhysics ( idEntity entity ) : void

Activate the physics object.

AddContactEntity ( idEntity entity ) : void
AddDamageEffect ( object collision, Vector3 velocity, string damageDefName ) : void
AddForce ( idEntity entity, int id, Vector3 point, Vector3 force ) : void
ApplyImpulse ( idEntity entity, int id, Vector3 point, Vector3 impulse ) : void
BecomeActive ( EntityThinkFlags flags ) : void
BecomeInactive ( EntityThinkFlags flags ) : void
ClientPredictionThink ( ) : void
ClientReceiveEvent ( int ev, int time, idBitMsg msg ) : bool
Collide ( object collision, Vector3 velocity ) : bool
ConstructScriptObject ( ) : idThread

Called during idEntity::Spawn. Calls the constructor on the script object.

Damage ( idEntity inflictor, idEntity attacker, Vector3 direction, string damageDefName, float damageScale, int location ) : void

DamageFeedback ( idEntity victim, idEntity inflictor, int &damage ) : void

Callback function for when another entity received damage from this entity. damage can be adjusted and returned to the caller.

Dispose ( ) : void
FreeModelDef ( ) : void
GetImpactInfo ( idEntity entity, int id, Vector3 point ) : object
GetMasterPosition ( Vector3 &masterOrigin, Matrix &masterAxis ) : bool
GetPhysicsToSoundTransform ( Vector3 &origin, Matrix &axis ) : bool
GetPhysicsToVisualTransform ( Vector3 &origin, Matrix &axis ) : bool
HandleSingleGuiCommand ( idEntity entityGui, idLexer lexer ) : bool
Hide ( ) : void
Pain ( idEntity inflictor, idEntity attacker, int damage, Vector3 direction, int location ) : bool

Called whenever an entity recieves damage. Returns whether the entity responds to the pain.

Present ( ) : void

Present is called to allow entities to generate refEntities, lights, etc for the renderer.

ProjectOverlay ( Vector3 origin, Vector3 direction, float size, string material ) : void
ReadFromSnapshot ( idBitMsgDelta msg ) : void
RemoveContactEntity ( idEntity entity ) : void
Restore ( object savefile ) : void
Save ( object savefile ) : void
ServerReceiveEvent ( int ev, int time, idBitMsg msg ) : bool
Show ( ) : void
Spawn ( ) : void
Teleport ( Vector3 origin, idAngles angles, idEntity destination ) : void
Think ( ) : void
UpdateAnimationControllers ( ) : bool
UpdateChangeableSpawnArgs ( idDict source ) : void

Any key/value pair that might change during the course of the game (e.g. via a gui) should be initialize here so a gui or other trigger can change something and have it updated properly. An optional source may be provided if the values reside in an outside dictionary and first need copied over to spawnArgs.

WriteToSnapshot ( idBitMsgDelta msg ) : void
idEntity ( ) : System

Protected Methods

Method Description
Dispose ( bool disposing ) : void
ModelCallback ( idRenderEntity renderEntity, idRenderView renderView ) : bool

May not change the game state whatsoever!

SetModel ( string modelName ) : void
SetPhysics ( idPhysics phys ) : void
UpdateRenderEntity ( idRenderEntity renderEntity, idRenderView renderView ) : bool
UpdateVisuals ( ) : void

Private Methods

Method Description
ClearPVSAreas ( ) : void
InitDefaultPhysics ( Vector3 origin, Matrix axis ) : void
UpdateModel ( ) : void
UpdateModelTransform ( ) : void

Method Details

ActivatePhysics() public method

Activate the physics object.
public ActivatePhysics ( idEntity entity ) : void
entity idEntity Entity activating us.
return void

AddContactEntity() public method

public AddContactEntity ( idEntity entity ) : void
entity idEntity
return void

AddDamageEffect() public method

public AddDamageEffect ( object collision, Vector3 velocity, string damageDefName ) : void
collision object
velocity Vector3
damageDefName string
return void

AddForce() public method

public AddForce ( idEntity entity, int id, Vector3 point, Vector3 force ) : void
entity idEntity
id int
point Vector3
force Vector3
return void

ApplyImpulse() public method

public ApplyImpulse ( idEntity entity, int id, Vector3 point, Vector3 impulse ) : void
entity idEntity
id int
point Vector3
impulse Vector3
return void

BecomeActive() public method

public BecomeActive ( EntityThinkFlags flags ) : void
flags EntityThinkFlags
return void

BecomeInactive() public method

public BecomeInactive ( EntityThinkFlags flags ) : void
flags EntityThinkFlags
return void

ClientPredictionThink() public method

public ClientPredictionThink ( ) : void
return void

ClientReceiveEvent() public method

public ClientReceiveEvent ( int ev, int time, idBitMsg msg ) : bool
ev int
time int
msg idBitMsg
return bool

Collide() public method

public Collide ( object collision, Vector3 velocity ) : bool
collision object
velocity Vector3
return bool

ConstructScriptObject() public method

Called during idEntity::Spawn. Calls the constructor on the script object.
public ConstructScriptObject ( ) : idThread
return idThread

Damage() public method

public Damage ( idEntity inflictor, idEntity attacker, Vector3 direction, string damageDefName, float damageScale, int location ) : void
inflictor idEntity Entity that is causing the damage.
attacker idEntity Entity that caused the inflictor to cause damage to us.
direction Vector3 Direction of the attack for knockback in global space.
damageDefName string
damageScale float
location int
return void

DamageFeedback() public method

Callback function for when another entity received damage from this entity. damage can be adjusted and returned to the caller.
public DamageFeedback ( idEntity victim, idEntity inflictor, int &damage ) : void
victim idEntity
inflictor idEntity
damage int
return void

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

FreeModelDef() public method

public FreeModelDef ( ) : void
return void

GetImpactInfo() public method

public GetImpactInfo ( idEntity entity, int id, Vector3 point ) : object
entity idEntity
id int
point Vector3
return object

GetMasterPosition() public method

public GetMasterPosition ( Vector3 &masterOrigin, Matrix &masterAxis ) : bool
masterOrigin Vector3
masterAxis Matrix
return bool

GetPhysicsToSoundTransform() public method

public GetPhysicsToSoundTransform ( Vector3 &origin, Matrix &axis ) : bool
origin Vector3
axis Matrix
return bool

GetPhysicsToVisualTransform() public method

public GetPhysicsToVisualTransform ( Vector3 &origin, Matrix &axis ) : bool
origin Vector3
axis Matrix
return bool

HandleSingleGuiCommand() public method

public HandleSingleGuiCommand ( idEntity entityGui, idLexer lexer ) : bool
entityGui idEntity
lexer idTech4.Text.idLexer
return bool

Hide() public method

public Hide ( ) : void
return void

ModelCallback() protected method

May not change the game state whatsoever!
protected ModelCallback ( idRenderEntity renderEntity, idRenderView renderView ) : bool
renderEntity idTech4.Renderer.idRenderEntity
renderView idTech4.Renderer.idRenderView
return bool

Pain() public method

Called whenever an entity recieves damage. Returns whether the entity responds to the pain.
public Pain ( idEntity inflictor, idEntity attacker, int damage, Vector3 direction, int location ) : bool
inflictor idEntity
attacker idEntity
damage int
direction Vector3
location int
return bool

Present() public method

Present is called to allow entities to generate refEntities, lights, etc for the renderer.
public Present ( ) : void
return void

ProjectOverlay() public method

public ProjectOverlay ( Vector3 origin, Vector3 direction, float size, string material ) : void
origin Vector3
direction Vector3
size float
material string
return void

ReadFromSnapshot() public method

public ReadFromSnapshot ( idBitMsgDelta msg ) : void
msg idBitMsgDelta
return void

RemoveContactEntity() public method

public RemoveContactEntity ( idEntity entity ) : void
entity idEntity
return void

Restore() public method

public Restore ( object savefile ) : void
savefile object
return void

Save() public method

public Save ( object savefile ) : void
savefile object
return void

ServerReceiveEvent() public method

public ServerReceiveEvent ( int ev, int time, idBitMsg msg ) : bool
ev int
time int
msg idBitMsg
return bool

SetModel() protected method

protected SetModel ( string modelName ) : void
modelName string
return void

SetPhysics() protected method

protected SetPhysics ( idPhysics phys ) : void
phys idTech4.Game.Physics.idPhysics
return void

Show() public method

public Show ( ) : void
return void

Spawn() public method

public Spawn ( ) : void
return void

Teleport() public method

public Teleport ( Vector3 origin, idAngles angles, idEntity destination ) : void
origin Vector3
angles idTech4.Math.idAngles
destination idEntity
return void

Think() public method

public Think ( ) : void
return void

UpdateAnimationControllers() public method

public UpdateAnimationControllers ( ) : bool
return bool

UpdateChangeableSpawnArgs() public method

Any key/value pair that might change during the course of the game (e.g. via a gui) should be initialize here so a gui or other trigger can change something and have it updated properly. An optional source may be provided if the values reside in an outside dictionary and first need copied over to spawnArgs.
public UpdateChangeableSpawnArgs ( idDict source ) : void
source idDict
return void

UpdateRenderEntity() protected method

protected UpdateRenderEntity ( idRenderEntity renderEntity, idRenderView renderView ) : bool
renderEntity idTech4.Renderer.idRenderEntity
renderView idTech4.Renderer.idRenderView
return bool

UpdateVisuals() protected method

protected UpdateVisuals ( ) : void
return void

WriteToSnapshot() public method

public WriteToSnapshot ( idBitMsgDelta msg ) : void
msg idBitMsgDelta
return void

idEntity() public method

public idEntity ( ) : System
return System

Property Details

IndexNone public property

public int IndexNone
return int

_renderEntity protected property

protected RenderEntityComponent,idTech4.Renderer _renderEntity
return idTech4.Renderer.RenderEntityComponent

_renderModel protected property

protected idRenderEntity,idTech4.Renderer _renderModel
return idTech4.Renderer.idRenderEntity

_renderView protected property

protected idRenderView,idTech4.Renderer _renderView
return idTech4.Renderer.idRenderView