Pong/Levels/Game.h

37 lines
700 B
C
Raw Normal View History

2023-11-11 18:56:55 -08:00
#pragma once
#include <LWE/LWE.h>
#include <LWE/Level.h>
2023-11-30 15:44:01 -08:00
#include <LWE/IO/RenderWindow.h>
2023-11-11 18:56:55 -08:00
class Game : public lwe::Level
{
2023-11-14 00:07:42 -08:00
private:
static const float paddleSpeed;
static const float ballSpeed;
lwe::UInt_64 plyScore;
lwe::UInt_64 aiScore;
bool started;
2023-11-11 18:56:55 -08:00
public:
~Game() override;
Game();
Game(const Game& lvl);
Game& operator=(const Game& lvl);
void SetupResources() override;
void Setup() override;
void PostInitialize(lwe::GpuCmdBuffer* cmdBuffer) override;
2023-11-30 15:44:01 -08:00
void OnUpdate(lwe::RenderWindow* win, lwe::Input* input, const float delta) override;
2023-11-11 18:56:55 -08:00
void PreRender(lwe::GpuCmdBuffer* cmdBuffer) override;
2023-11-14 00:07:42 -08:00
private:
void ResetGame(const lwe::Entity* bounds, lwe::Entity* ball);
2023-11-11 18:56:55 -08:00
};