Files
DNF_DEV/source/EngineFrame/Base/Actor.h

31 lines
706 B
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#pragma once
#include "EngineFrame/Base/BaseNode.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 Update(float deltaTime) override;
void Render() override;
// 设置裁切视口(放在Actor里 他与他的子对象都会被裁切)
void SetCropViewport(SDL_Rect CropViewport);
// 获取裁切视口
SDL_Rect GetCropViewport();
};