mirror of
https://github.com/zhenyan121/SporeBG-Conid.git
synced 2026-04-10 06:14:08 +08:00
Use GameScene to control render
This commit is contained in:
21
src/scenes/gameplay/GameScene.h
Normal file
21
src/scenes/gameplay/GameScene.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
#include "scenes/base/Scene.h"
|
||||
#include "graphics/GameRenderer.h"
|
||||
#include "graphics/CoordinateConverter.h"
|
||||
#include "game/GameSession.h"
|
||||
#include <memory>
|
||||
class GameScene : public Scene {
|
||||
public:
|
||||
GameScene();
|
||||
~GameScene();
|
||||
|
||||
void onEnter(SDL_Renderer* renderer, int WIDTH, int HEIGHT) override;
|
||||
|
||||
void update() override;
|
||||
void render() override;
|
||||
void handleClick(float screenX, float screenY) override;
|
||||
private:
|
||||
std::unique_ptr<GameRenderer> m_renderer;
|
||||
std::unique_ptr<CoordinateConverter> m_CoordinateConverter;
|
||||
std::unique_ptr<GameSession> m_gameSession;
|
||||
};
|
||||
Reference in New Issue
Block a user