RioEngine
0.1
My first attempt to create a 3D WYSIWYG Game Engine
|
#include <cgameobjectfactory.h>
Static Public Member Functions | |
template<class T > | |
static bool | addType () |
static const QStringList & | types () |
static CGameObject * | createInstance (const char *class_name) |
static const QString & | getTypeNameHavingId (int type_id) |
static int | getObjectTypeId (const char *class_name) |
The user is able to select a custom type for any game object while creating the game scene in the editor. So, any Type that inherits from CGameObject can be attached to a CGameObject at runtime. CGameObjectFactory is used to register these special types and also to instantiate game objects.
Definition at line 44 of file cgameobjectfactory.h.
|
inlinestatic |
Registers the specified Type. Note: It must inherit from CGameObject!
Definition at line 50 of file cgameobjectfactory.h.
|
static |
Instantiates a game object with the specified type. Note: The type must have been previously registered by the addType<T>() method
Definition at line 41 of file cgameobjectfactory.cpp.
|
static |
Returns the type id associated to the class_name
Definition at line 61 of file cgameobjectfactory.cpp.
|
static |
Returns the type name associated to the specified type_id
Definition at line 67 of file cgameobjectfactory.cpp.
|
static |
Returns the current supported type list
Definition at line 55 of file cgameobjectfactory.cpp.