Pong/Levels/Game.h

36 lines
643 B
C
Raw Permalink Normal View History

2023-11-11 18:56:55 -08:00
#pragma once
#include <LWE/LWE.h>
#include <LWE/Level.h>
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;
void OnUpdate(lwe::Input* input, const float delta) override;
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
};