Base class that any object that updates or renders (including VState) inherints from this class.
More...
#include <VBase.h>
|
virtual void | Destroy () |
| Destroys object and any data that must be destroyed.
|
|
virtual void | Kill () |
|
virtual void | Revive () |
| Revives the object by setting both alive and exists back to true.
|
|
virtual void | Update (float dt) |
|
virtual void | Draw (sf::RenderTarget &RenderTarget) |
|
|
static const wchar_t * | VString (const char *fmt,...) |
|
static void | VLog (const char *fmt,...) |
|
static void | VLogError (const char *fmt,...) |
|
static void | VClearLog () |
|
|
bool | active = true |
| Base can be updated using Update if true.
|
|
bool | visible = true |
| Base can be rendered using Draw if true.
|
|
bool | alive = true |
| Helper member that is mainly used filter out behaviours to objects which aren't alive in the scene.
|
|
bool | exists = true |
| Base can be updated and rendered if true, else it would no longer be treated as being part of the scene.
|
|
VType | type = NONE |
| Base object type, typically set in the constructor of an inherited object to specify what type it is.
|
|
uint32_t | RefCount = 0 |
| Counts the amount of times the object is referenced in groups, ensures an object is only destroyed when no longer part of a single group.
|
|
Base class that any object that updates or renders (including VState) inherints from this class.
◆ Draw()
virtual void VBase::Draw |
( |
sf::RenderTarget & |
RenderTarget | ) |
|
|
inlinevirtual |
Draws object. (Default does nothing)
- Parameters
-
RenderTarget | The game's sf::RenderTarget object to render data onto. |
Reimplemented in VObject, VTilemap, VEmitter, VText, V3DModel, VGroup, VGradient, V3DObject, VSprite, VSubState, VShape, VRenderGroup, VTiledSprite, VBackdrop, V3DObjModel, V3DScene, V9Slice, VRenderLayer, VTrailArea, and V3DBatchModelGroup.
◆ Kill()
virtual void VBase::Kill |
( |
| ) |
|
|
inlinevirtual |
Kills the object by alive to false, alive is also set to false so it will not render or update. To allow it to be rendered or updated, the function must be overridden so only alive is set to false.
Reimplemented in VEmitter, VGroup, and VRenderGroup.
◆ Update()
virtual void VBase::Update |
( |
float |
dt | ) |
|
|
inlinevirtual |
Updates object and any data it contains. (Default does nothing)
- Parameters
-
dt | Delta Time between the previous and current frame. |
Reimplemented in VObject, VTilemap, VEmitter, VGroup, VTypedText, V3DObject, VSprite, VSubState, VPhysicsObject, VRenderGroup, VBackdrop, VPhysicsGroup, V3DScene, VState, VRenderLayer, VParticle, VTile, and VTextPath.
◆ VClearLog()
static void VBase::VClearLog |
( |
| ) |
|
|
static |
Helper function that clears out the command line/terminal.
◆ VLog()
static void VBase::VLog |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
|
static |
Outputs text for logging purposes (to Console, Output Window ect...).
- Parameters
-
fmt | Formatted string that will be printed (for example: d will print an integer value). |
... | You must pass in all values of each specified type that are required for the formatted string. |
◆ VLogError()
static void VBase::VLogError |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
|
static |
Outputs text for logging purposes (to Console, Output Window ect...) but will also throw a runtime error or show a popup window of the specific error.
- Parameters
-
fmt | Formatted string that will be printed (for example: d will print an integer value). |
... | You must pass in all values of each specified type that are required for the formatted string. |
◆ VString()
static const wchar_t* VBase::VString |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
|
static |
Helper to create strings with format parameters.
- Parameters
-
fmt | Formatted string that will be printed (for example: d will print an integer value). |
... | You must pass in all values of each specified type that are required for the formatted string. |
The documentation for this class was generated from the following file:
- D:/Development/Libs/Vigilante-Game-Framework/VFrame/VBase.h