30 lines
783 B
C++
30 lines
783 B
C++
#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
|