//
// Created by sfd on 25-5-28.
//

#ifndef SCRIPTABLEENTITY_H
#define SCRIPTABLEENTITY_H

#include "Entity.h"
#include "Hazel/Core/Core.h"

namespace Hazel
{
    class HAZEL_API ScriptableEntity{
    public:

        virtual ~ScriptableEntity() {}

        template<typename T>
        T& GetComponent()
        {
            return m_Entity.GetComponent<T>();
        }

    protected:
        virtual void OnCreate(){}
        virtual void OnDestroy(){}
        virtual void OnUpdate(TimeStep ts) {}

    private:
        Entity m_Entity;

        friend class Scene;
    };
}


#endif //SCRIPTABLEENTITY_H
