souleng
Game engine providing full Python scripting support
|
#include <ScriptComponent.hpp>
Public Member Functions | |
virtual void | Input () |
Called once per frame to handle any new input. | |
virtual void | Update (float dt) |
virtual void | Render () |
![]() | |
void | SetGameObject (std::weak_ptr< GameObject > ent) |
Sets the GameObject this component is attached to. | |
std::shared_ptr< GameObject > | GetGameObject () |
Retrieves the GameObject this component is attached to, behind a shared pointer. | |
template<typename T > | |
std::shared_ptr< T > | GetComponent () |
Alias for GetGameObject()->GetComponent<T>() , for easier scripting. | |
Static Public Member Functions | |
static ComponentType | GetType () |
Returns the type of this component to make querying GetComponent easier. | |
![]() | |
static ComponentType | GetType () |
Returns the type of this component to make querying GetComponent easier. | |
Additional Inherited Members | |
![]() | |
std::weak_ptr< GameObject > | mGameObject |
A largely virtual component which is set up to be inherited and overriden by Python created components.
|
static |
Returns the type of this component to make querying GetComponent
easier.
|
virtual |
Called once per frame to handle any new input.
Reimplemented from Component.
Reimplemented in PyScriptComponent.
|
virtual |
Called once per frame to render any necessary parts of this component to the screen
Reimplemented from Component.
Reimplemented in PyScriptComponent.
|
virtual |
Called once per frame for any timing specific logic
deltaTime | The tick rate of the game, in seconds. Useful for things like velocity calculations |
Reimplemented from Component.
Reimplemented in PyScriptComponent.