Pong/Levels/Game.h
2024-06-29 22:28:46 -07:00

36 lines
720 B
C++

#pragma once
#include <lwe/Level.h>
#include <lwe/RenderWindow.h>
class Game : public lwe::Level
{
private:
static const float paddleSpeed;
static const float ballSpeed;
ehs::UInt_64 plyScore;
ehs::UInt_64 aiScore;
bool started;
public:
~Game() override;
Game();
Game(const Game& lvl);
Game& operator=(const Game& lvl);
void SetupResources(lwe::GpuInterface *inf) override;
void Setup(lwe::GpuInterface *inf) override;
void PostInitialize(lwe::GpuCmdBuffer* cmdBuffer) override;
void OnUpdate(lwe::RenderWindow* win, ehs::Input* input, const float delta) override;
void PreRender(lwe::GpuCmdBuffer* cmdBuffer) override;
private:
void ResetGame(const lwe::Entity* bounds, lwe::Entity* ball);
};