Начинаю добавлять управление камерой. (Сейчас только её позиция)
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
#include "Camera.hpp"
|
||||
|
||||
#include "../../RenderEngine/UwURenderEngine.hpp"
|
||||
#include "Core/CoreInstance.hpp"
|
||||
#include "Game/GameInstance.hpp"
|
||||
#include "Game/SaveMap/SaveMap.hpp"
|
||||
#include "Game/World/World.hpp"
|
||||
|
||||
Camera::Camera()
|
||||
{
|
||||
SetType(Classes::Camera);
|
||||
}
|
||||
|
||||
std::shared_ptr<SaveMap> Camera::save()
|
||||
{
|
||||
return std::make_shared<SaveMap>("Camera")->connect_to(Actor::save());
|
||||
}
|
||||
|
||||
void Camera::load(std::shared_ptr<SaveMap> save)
|
||||
{
|
||||
Actor::load(save->getParent());
|
||||
}
|
||||
|
||||
void Camera::SetActive() const noexcept
|
||||
{
|
||||
GET_RENDER_ENGINE->SetActiveCamera(GetWorld()->GetActorByID<Camera>(GetName()));
|
||||
}
|
||||
Reference in New Issue
Block a user