37 lines
700 B
C++
37 lines
700 B
C++
#pragma once
|
|
|
|
#include <LWE/LWE.h>
|
|
#include <LWE/Level.h>
|
|
#include <LWE/IO/RenderWindow.h>
|
|
|
|
class Game : public lwe::Level
|
|
{
|
|
private:
|
|
static const float paddleSpeed;
|
|
static const float ballSpeed;
|
|
lwe::UInt_64 plyScore;
|
|
lwe::UInt_64 aiScore;
|
|
bool started;
|
|
|
|
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::RenderWindow* win, lwe::Input* input, const float delta) override;
|
|
|
|
void PreRender(lwe::GpuCmdBuffer* cmdBuffer) override;
|
|
|
|
private:
|
|
void ResetGame(const lwe::Entity* bounds, lwe::Entity* ball);
|
|
}; |