Meteos/Meteos.h
sigonasr2 b87fbcce50 Fixed timesteps was the key
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
2022-11-27 22:14:25 -06:00

23 lines
570 B
C++

#ifndef METEOS_H
#define METEOS_H
#include "pixelGameEngine.h"
#include "Board.h"
#include <random>
class Meteos : public olc::PixelGameEngine{
public:
Meteos(){
sAppName="Meteos";
}
float lastBlockSpawn=0.0f;
float accumulatedTime=0.0f;
std::uniform_int_distribution<> randBlockPos,coinFlip;
std::mt19937 gen;
Board gameBoard;
std::map<std::string,Renderable> SPRITES;
bool OnUserCreate()override;
void updateGame(float fElapsedTime);
void drawGame();
bool OnUserUpdate(float fElapsedTime)override;
};
#endif