VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
visutwin::canvas::ScriptComponent Class Reference

#include <framework/components/script/scriptComponent.h>

Inheritance diagram for visutwin::canvas::ScriptComponent:
[legend]

Public Member Functions

template<typename T>
T * create ()
Scriptcreate (const std::string &name, const ScriptCreateOptions &options={})
int executionOrder () const
void fixedUpdateScripts (float fixedDt)
void initializeComponentData () override
void postUpdateScripts (float dt)
 ScriptComponent (IComponentSystem *system, Entity *entity)
void setEnabled (bool value) override
void setExecutionOrder (const int value)
void updateScripts (float dt)
Public Member Functions inherited from visutwin::canvas::Component
virtual void cloneFrom (const Component *source)
 Component (IComponentSystem *system, Entity *entity)
virtual bool enabled () const
Entityentity () const
virtual void onDisable ()
virtual void onEnable ()
virtual void onPostStateChange ()
IComponentSystemsystem () const
virtual ~Component ()=default
Public Member Functions inherited from visutwin::canvas::EventHandler
template<typename... Args>
EventHandlerfire (const std::string &name, Args &&... args)
bool hasEvent (const std::string &name) const
void initEventHandler ()
template<typename Callback>
requires (!std::is_same_v<std::decay_t<Callback>, HandleEventCallback>)
EventHandleroff (const std::string &name, Callback &&callback, void *scope=nullptr)
EventHandleroff (const std::string &name="", const HandleEventCallback &callback=HandleEventCallback(), void *scope=nullptr)
EventHandleroffByHandle (EventHandle *handle)
template<typename Callback>
requires (!std::is_same_v<std::decay_t<Callback>, HandleEventCallback>)
EventHandleon (const std::string &name, Callback &&callback, void *scope=nullptr)
EventHandleon (const std::string &name, HandleEventCallback callback, void *scope=nullptr)
template<typename Callback>
requires (!std::is_same_v<std::decay_t<Callback>, HandleEventCallback>)
EventHandleonce (const std::string &name, Callback &&callback, void *scope=nullptr)
EventHandleonce (const std::string &name, HandleEventCallback callback, void *scope=nullptr)
virtual ~EventHandler ()=default

Additional Inherited Members

Protected Member Functions inherited from visutwin::canvas::Component
virtual void onSetEnabled (bool oldValue, bool newValue)
Protected Member Functions inherited from visutwin::canvas::EventHandler
EventHandleaddCallback (const std::string &name, HandleEventCallback callback, void *scope=nullptr, bool once=false)
Protected Attributes inherited from visutwin::canvas::Component
bool _enabled = true
Entity_entity

Detailed Description

Definition at line 28 of file scriptComponent.h.

Constructor & Destructor Documentation

◆ ScriptComponent()

visutwin::canvas::ScriptComponent::ScriptComponent ( IComponentSystem * system,
Entity * entity )
inline

Member Function Documentation

◆ create() [1/2]

template<typename T>
T * visutwin::canvas::ScriptComponent::create ( )
inline

Definition at line 36 of file scriptComponent.h.

References create().

Referenced by create().

◆ create() [2/2]

Script * visutwin::canvas::ScriptComponent::create ( const std::string & name,
const ScriptCreateOptions & options = {} )

◆ executionOrder()

int visutwin::canvas::ScriptComponent::executionOrder ( ) const
inline

Definition at line 48 of file scriptComponent.h.

◆ fixedUpdateScripts()

void visutwin::canvas::ScriptComponent::fixedUpdateScripts ( float fixedDt)

◆ initializeComponentData()

void visutwin::canvas::ScriptComponent::initializeComponentData ( )
inlineoverridevirtual

Implements visutwin::canvas::Component.

Definition at line 41 of file scriptComponent.h.

◆ postUpdateScripts()

void visutwin::canvas::ScriptComponent::postUpdateScripts ( float dt)

◆ setEnabled()

void visutwin::canvas::ScriptComponent::setEnabled ( bool value)
overridevirtual

◆ setExecutionOrder()

void visutwin::canvas::ScriptComponent::setExecutionOrder ( const int value)
inline

Definition at line 49 of file scriptComponent.h.

◆ updateScripts()

void visutwin::canvas::ScriptComponent::updateScripts ( float dt)

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