souleng
Game engine providing full Python scripting support
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
PyScriptComponent Class Reference

#include <ScriptComponent.hpp>

Inheritance diagram for PyScriptComponent:
ScriptComponent Component

Public Member Functions

void Input () override
 Called once per frame to handle any new input.
 
void Update (float dt) override
 
void Render () override
 
 ScriptComponent ()
 
- Public Member Functions inherited from Component
void SetGameObject (std::weak_ptr< GameObject > ent)
 Sets the GameObject this component is attached to.
 
std::shared_ptr< GameObjectGetGameObject ()
 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 ()
 
- Static Public Member Functions inherited from ScriptComponent
static ComponentType GetType ()
 Returns the type of this component to make querying GetComponent easier.
 
- Static Public Member Functions inherited from Component
static ComponentType GetType ()
 Returns the type of this component to make querying GetComponent easier.
 

Additional Inherited Members

- Protected Attributes inherited from Component
std::weak_ptr< GameObjectmGameObject
 

Detailed Description

Trampoline class which allows Python code to override ScriptComponent methods, and for C++ code to call those overridden methods instead of ScriptComponent

Member Function Documentation

◆ Input()

void PyScriptComponent::Input ( )
overridevirtual

Called once per frame to handle any new input.

Reimplemented from ScriptComponent.

◆ Render()

void PyScriptComponent::Render ( )
overridevirtual

Called once per frame to render any necessary parts of this component to the screen

Reimplemented from ScriptComponent.

◆ Update()

void PyScriptComponent::Update ( float dt)
overridevirtual

Called once per frame for any timing specific logic

Parameters
deltaTimeThe tick rate of the game, in seconds. Useful for things like velocity calculations

Reimplemented from ScriptComponent.


The documentation for this class was generated from the following files: