Dawn/src/dawnrose/scene/components/GameCamera.hpp

31 lines
872 B
C++

// Copyright (c) 2023 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#pragma once
#include "scene/components/display/Camera.hpp"
#include "scene/components/PlayerController.hpp"
namespace Dawn {
class GameCamera : public SceneItemComponent {
protected:
Camera *camera = nullptr;
glm::vec2 slowTarget = glm::vec2(0, 0);
glm::vec2 current = glm::vec2(0, 0);
public:
// @optional
glm::vec2 lookOffsetScale = glm::vec2(6.0f, 3.0f);
// @optional
float_t movementScrollSpeed = 0.5f;
// @optional
glm::vec3 zoomOffset = glm::vec3(0, 30.0f, 7.5f);
// @optional
PlayerController *player = nullptr;
GameCamera(SceneItem *item);
std::vector<SceneItemComponent*> getDependencies() override;
void onStart() override;
};
}