mirror of
https://github.com/HowestDAE/dae16-VerhulstBram.git
synced 2025-12-18 03:59:20 +01:00
Reformat + Basic animation system
General fixes
This commit is contained in:
@@ -5,28 +5,42 @@ class Player;
|
||||
class Camera
|
||||
{
|
||||
public:
|
||||
Camera( );
|
||||
Camera( const Point2f& position, float scale = 1);
|
||||
Camera();
|
||||
Camera(const Point2f& position, float scale = 1);
|
||||
~Camera() = default;
|
||||
|
||||
void SetPosition( const Point2f& position ) { m_Position = position; }
|
||||
void SetScale( const float scale ) { m_Scale = scale; }
|
||||
Camera(const Camera& other) = default;
|
||||
Camera& operator=(const Camera& other) = default;
|
||||
|
||||
const Point2f& GetPosition( ) const { return m_Position; }
|
||||
float GetScale( ) const { return m_Scale; }
|
||||
void SetPosition(const Point2f& position) {
|
||||
m_Position = position;
|
||||
}
|
||||
void SetScale(const float scale) {
|
||||
m_Scale = scale;
|
||||
}
|
||||
|
||||
const Point2f& GetPosition() const {
|
||||
return m_Position;
|
||||
}
|
||||
float GetScale() const {
|
||||
return m_Scale;
|
||||
}
|
||||
|
||||
void BeginRendering() const;
|
||||
void EndRendering() const;
|
||||
|
||||
void SetTrackingPlayer(Player* player) { m_FollowingPlayer = player; }
|
||||
void SetTrackingPlayer(Player* player) {
|
||||
m_FollowingPlayer = player;
|
||||
}
|
||||
|
||||
Point2f TransformMouse (const Point2f& mousePos) const;
|
||||
Point2f TransformWorld (const Point2f& worldPos) const;
|
||||
Rectf Viewport = Rectf{ 0, 0, 846.f, 500.f };
|
||||
Point2f TransformMouse(const Point2f& mousePos) const;
|
||||
Point2f TransformWorld(const Point2f& worldPos) const;
|
||||
Rectf Viewport = Rectf { 0, 0, 846.f, 500.f };
|
||||
//TODO: Remove this and make it some static
|
||||
|
||||
|
||||
private:
|
||||
Point2f m_Position;
|
||||
float m_Scale;
|
||||
Player* m_FollowingPlayer{ nullptr };
|
||||
Player* m_FollowingPlayer { nullptr };
|
||||
//TODO: Ask if the rule applies to the fact that the player is not managed by the camera
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user