mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-26 19:43:29 +00:00
setting GameManager dimensions
This commit is contained in:
+5
-2
@@ -24,9 +24,12 @@ namespace battleship{
|
||||
|
||||
GameManager::~GameManager() {}
|
||||
|
||||
void GameManager::start() {
|
||||
void GameManager::start(int width, int height) {
|
||||
this->width = 800;
|
||||
this->height = 600;
|
||||
|
||||
Root *root = Root::getSingleton();
|
||||
root->start(800, 600, "../../vb01/", "Battleship");
|
||||
root->start(width, height, "../../vb01/", "Battleship");
|
||||
|
||||
stateManager = new StateManager();
|
||||
listener = new InputManager(root->getWindow());
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ namespace battleship{
|
||||
class GameManager {
|
||||
public:
|
||||
static GameManager* getSingleton();
|
||||
void start();
|
||||
void start(int, int);
|
||||
void update();
|
||||
inline int getWidth(){return width;}
|
||||
inline int getHeight(){return height;}
|
||||
|
||||
@@ -7,7 +7,7 @@ using namespace battleship;
|
||||
|
||||
int main() {
|
||||
GameManager *gameManager = GameManager::getSingleton();
|
||||
gameManager->start();
|
||||
gameManager->start(800, 600);
|
||||
GuiAppState *state = new GuiAppState();
|
||||
gameManager->getStateManager()->attachState(state);
|
||||
makeTitlescreenButtons(state);
|
||||
|
||||
Reference in New Issue
Block a user