added basic structures
This commit is contained in:
29
TSE_Core/src/elements/BehaviourScript.hpp
Normal file
29
TSE_Core/src/elements/BehaviourScript.hpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
namespace TSE
|
||||
{
|
||||
class Transformable;
|
||||
|
||||
class BehaviourScript
|
||||
{
|
||||
public:
|
||||
BehaviourScript();
|
||||
virtual ~BehaviourScript() = default;
|
||||
|
||||
inline virtual void OnUpdate() { };
|
||||
inline virtual void OnEnable() { };
|
||||
inline virtual void OnDisable() { };
|
||||
inline virtual void Start() { };
|
||||
virtual const char* GetName() = 0;
|
||||
inline virtual void CustomDraw(const bool& debug) { };
|
||||
void SetEnabled(bool v);
|
||||
bool IsEnabled() const;
|
||||
|
||||
void SetBaseObject(Transformable* obj);
|
||||
Transformable* GetTransform() const;
|
||||
|
||||
Transformable* baseObject;
|
||||
protected:
|
||||
bool enabled = true;
|
||||
};
|
||||
} // namespace TSE
|
||||
Reference in New Issue
Block a user