GameBase

Base class for game objects which use datablocks, networking, are editable, and need to process ticks.

Inherit:
SceneObject

Description

Base class for game objects which use datablocks, networking, are editable, and need to process ticks.

Methods

bool GameBase::applyImpulse(Point3F pos, VectorF vel)

Apply an impulse to this object as defined by a world position and velocity vector.

Parameters:
  • pos – impulse world position
  • vel – impulse velocity (impulse force F = m * v)
Returns:

Always true

void GameBase::applyRadialImpulse(Point3F origin, float radius, float magnitude)

Applies a radial impulse to the object using the given origin and force.

Parameters:
  • origin – World point of origin of the radial impulse.
  • radius – The radius of the impulse area.
  • magnitude – The strength of the impulse.
int GameBase::getDataBlock()

Get the datablock used by this object.

Returns:is using.
void GameBase::setControl(bool controlled)

Called when the client controlling the object changes.

Parameters:controlled – true if a client now controls this object, false if no client controls this object.
bool GameBase::setDataBlock(GameBaseData data)

Assign this GameBase to use the specified datablock.

Parameters:data – new datablock to use
Returns:true if successful, false if failed.

Fields

bool GameBase::boundingBox[static]

Toggles on the rendering of the bounding boxes for certain types of objects in scene.

GameBaseData GameBase::dataBlock

Script datablock used for game objects.