Last active
October 20, 2018 15:22
-
-
Save hugoam/2c3385b90864472071fd673986d76345 to your computer and use it in GitHub Desktop.
minimal game
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyGame : public GameModule | |
{ | |
public: | |
MyGame(Module& module) : GameModule(module) {} | |
virtual void init(GameShell& app, Game& game) final | |
{ | |
this->start(app, game); | |
} | |
virtual void start(GameShell& app, Game& game) final | |
{ | |
} | |
virtual void pump(GameShell& app, Game& game, Widget& ui) final | |
{ | |
} | |
}; | |
int main(int argc, char *argv[]) | |
{ | |
GameShell app(carray<cstring, 1>{ TOY_RESOURCE_PATH }, argc, argv); | |
Module module = { "MyGame" }; | |
MyGame game_module = { module }; | |
app.run_game(game_module); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment