Engine²
Open-source game engine written in C++.
Loading...
Searching...
No Matches
NativeScripting::Component::NativeScripting Struct Reference

#include <NativeScriptingComponent.hpp>

Public Member Functions

template<typename T>
void Bind (Engine::Core &core)

Public Attributes

std::unique_ptr< Utils::ScriptableEntityseInstance = nullptr
std::function< void(Engine::Entity)> Instantiate
std::function< void()> DestroyInstance
std::function< void(Utils::ScriptableEntity *)> OnCreate
std::function< void(Utils::ScriptableEntity *)> OnDestroy
std::function< void(Utils::ScriptableEntity *)> OnUpdate

Detailed Description

Component used to allow native scripting for entities. Implementation is well explained and inspired from this Youtube video made by @TheCherno https://www.youtube.com/watch?v=iIUhg88MK5M&t=901s&pp=ygUbbmF0aXZlIHNjcmlwdGluZyB0aGUgY2hlcm5v

Member Function Documentation

◆ Bind()

template<typename T>
void NativeScripting::Component::NativeScripting::Bind ( Engine::Core & core)
inline

Member Data Documentation

◆ DestroyInstance

std::function<void()> NativeScripting::Component::NativeScripting::DestroyInstance

◆ Instantiate

std::function<void(Engine::Entity)> NativeScripting::Component::NativeScripting::Instantiate

◆ OnCreate

std::function<void(Utils::ScriptableEntity *)> NativeScripting::Component::NativeScripting::OnCreate

◆ OnDestroy

std::function<void(Utils::ScriptableEntity *)> NativeScripting::Component::NativeScripting::OnDestroy

◆ OnUpdate

std::function<void(Utils::ScriptableEntity *)> NativeScripting::Component::NativeScripting::OnUpdate

◆ seInstance

std::unique_ptr<Utils::ScriptableEntity> NativeScripting::Component::NativeScripting::seInstance = nullptr

The documentation for this struct was generated from the following file: