|
|
|
GameBase Class Reference
[Game Objects]
Base class for game objects which use datablocks, networking, are editable, and need to process ticks. More...
Inheritance diagram for GameBase:

Public Member Functions | |
| bool | applyImpulse (Point3F pos, VectorF vel) |
| Apply an impulse to this object as defined by a world position and velocity vector. | |
| void | applyRadialImpulse (Point3F origin, float radius, float magnitude) |
| Applies a radial impulse to the object using the given origin and force. | |
| int | getDataBlock () |
| Get the datablock used by this object. | |
| bool | setDataBlock (GameBaseData data) |
| Assign this GameBase to use the specified datablock. | |
Callbacks | |
| void | setControl (bool controlled) |
| Called when the client controlling the object changes. | |
Public Attributes | |
Game | |
| GameBaseData | dataBlock |
| Script datablock used for game objects. | |
Static Public Attributes | |
| static bool | boundingBox |
| Toggles on the rendering of the bounding boxes for certain types of objects in scene. | |
| static bool | isRenderable |
| Disables rendering of all instances of this type. | |
| static bool | isSelectable |
| Disables selection of all instances of this type. | |
Detailed Description
Base class for game objects which use datablocks, networking, are editable, and need to process ticks.
Member Function Documentation
| 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
- Note:
- Not all objects that derrive from GameBase have this defined.
| 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.
- Note:
- Not all objects that derrive from GameBase have this defined.
| int GameBase::getDataBlock | ( | ) |
Get the datablock used by this object.
- Returns:
- the datablock this GameBase is using.
- See also:
- setDataBlock()
| 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.
- See also:
- getDataBlock()
Member Data Documentation
bool GameBase::boundingBox [static] |
Toggles on the rendering of the bounding boxes for certain types of objects in scene.
Script datablock used for game objects.
Copyright © GarageGames, LLC. All Rights Reserved.