Created Capter2 for Test with componentbased objects
This commit is contained in:
33
Capter2/game.hpp
Normal file
33
Capter2/game.hpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
#include "SDL2/SDL.h"
|
||||
#include <vector>
|
||||
|
||||
class game
|
||||
{
|
||||
private:
|
||||
void input(); //Process input
|
||||
void update(); //update game
|
||||
void output(); // generate output
|
||||
|
||||
SDL_Window *ptr_MainWindow;
|
||||
SDL_Renderer *ptr_MainRenderer;
|
||||
Uint32 GameTick;
|
||||
|
||||
bool GameIsRunning;
|
||||
bool UpdateActors;
|
||||
|
||||
std::vector<class Actor *> ActorList;
|
||||
|
||||
public:
|
||||
game(); //constructor
|
||||
~game(); //destructor
|
||||
|
||||
bool Init(int x, int y, int w, int h);
|
||||
void RunLoop();
|
||||
void Shutdown();
|
||||
|
||||
void AddActor(class Actor *ptr_actor);
|
||||
void RemActor(class Actor *ptr_actor);
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user