摄像机系统,和子对象绑定

This commit is contained in:
ArchZer0
2026-08-17 16:15:05 +08:00
parent 63d97f058a
commit 7b7756f0fe
20 changed files with 744 additions and 132 deletions
+20
View File
@@ -0,0 +1,20 @@
#pragma once
#include <string>
#include <actor.hpp>
namespace boundard {
class Camera : public Actor {
public:
Camera(std::string name, Game& game) : Actor(std::move(name), game) {}
float zoom() const { return zoom_; }
void set_zoom(float zoom) { zoom_ = zoom > 0.0F ? zoom : 0.0001F; }
private:
float zoom_ = 1.0F;
};
} // namespace boundard