Created
September 17, 2020 05:33
-
-
Save Pikachuxxxx/1346bdc96712dd0830dc114a37582b50 to your computer and use it in GitHub Desktop.
A simple snippet of example game initialisation for Fireworks Engine
This file contains hidden or 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
#include <fireworks/fireworks.h> | |
using namespace fireworks; | |
class ExampleTemplate : public Fireworks | |
{ | |
private: | |
Window* window; | |
public: | |
ExampleTemplate() | |
{ | |
} | |
~ExampleTemplate() | |
{ | |
} | |
// Runs once per initialisation | |
void init() override | |
{ | |
window = createWindow("Example Template", 800, 600); | |
} | |
// Runs once per second | |
void tick() override | |
{ | |
} | |
// Runs 60 times per second | |
void update() override | |
{ | |
} | |
// Runs as fast as possible | |
void render() override | |
{ | |
} | |
}; | |
int main() | |
{ | |
ExampleTemplate game; | |
game.start(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment