#pragma once
#include "EngineFrame/Base/BaseNode.h"
#include "EngineFrame/Component/Component.h"
#include "Tool/IntrusiveList.hpp"
class Scene;
/**
 * @brief Actor类，继承自Actor_base类
 *
 * Actor类是一个基础的游戏对象类，可以添加到场景中
 */
class Actor : public BaseNode
{
private:
    //裁切视口Flag
    bool _CropViewportFlag = false;
    //裁切视口
    SDL_Rect _CropViewport = {0, 0, 0, 0};

public:
    Actor();

public:
    void Init() override;
    void Render() override;
    void AddComponent(RefPtr<Component> Component);
    void RemoveComponent(RefPtr<Component> Component);

    // 设置裁切视口(放在Actor里 他与他的子对象都会被裁切)
    void SetCropViewport(SDL_Rect CropViewport);
    // 获取裁切视口
    SDL_Rect GetCropViewport();
};
