Initial release: SDL Windows Tetris
This commit is contained in:
20
src/states/LoadingState.h
Normal file
20
src/states/LoadingState.h
Normal file
@ -0,0 +1,20 @@
|
||||
// LoadingState.h
|
||||
#pragma once
|
||||
#include "State.h"
|
||||
|
||||
class LoadingState : public State {
|
||||
public:
|
||||
LoadingState(StateContext& ctx);
|
||||
void onEnter() override;
|
||||
void onExit() override;
|
||||
void handleEvent(const SDL_Event& e) override;
|
||||
void update(double frameMs) override;
|
||||
void render(SDL_Renderer* renderer, float logicalScale, SDL_Rect logicalVP) override;
|
||||
|
||||
private:
|
||||
double loadingProgress = 0.0;
|
||||
Uint64 loadStart = 0;
|
||||
bool musicLoaded = false;
|
||||
int currentTrackLoading = 0;
|
||||
int totalTracks = 0;
|
||||
};
|
||||
Reference in New Issue
Block a user