SpiecsEngine
 
Loading...
Searching...
No Matches
NativeScriptComponent.cpp
Go to the documentation of this file.
1/**
2* @file NativeScriptComponent.cpp.
3* @brief The NativeScriptComponent Class Implementation.
4* @author Spices.
5*/
6
7#include "Pchheader.h"
9
10namespace Spices {
11
13 {
14 m_RealNScriptComp = realComp;
15 }
16
17 void NativeScriptComponent::OnComponentAdded(const entt::entity& entity)
18 {
19 Component::OnComponentAdded(entity);
20
21 /**
22 * @brief Call Construction in RealNScripComponent
23 */
25 }
26
28 {
29 m_RealNScriptComp->m_Owner = m_Owner;
30
31 m_RealNScriptComp->OnConstruction();
32 }
33
35 {
36 m_RealNScriptComp->OnTick(ts);
37 }
38
40 {
41 m_RealNScriptComp->OnEvent(e);
42 }
43}
This Class is the basic Event Class. Inherit from it and create specific event class.
Definition Event.h:96
virtual void OnTick(TimeStep &ts)
This interface defines the behaves on specific component tick every frame.
virtual void OnEvent(Event &e)
This interface defines the behaves on specific component event happened.
NativeScriptComponent(std::shared_ptr< NativeScriptComponent > realComp)
Constructor Function. Init class variable. Usually call it.
virtual void OnComponentAdded(const entt::entity &entity) override final
This interface defines the behaves on specific component added. Init with variable.
virtual void OnConstruction()
This interface defines the behaves on specific component added.
NativeScriptComponent Class. This class defines the specific behaves of NativeScriptComponent....
This Class handles our engine time step during frames. Global Unique.
Definition TimeStep.h:22