diff options
Diffstat (limited to 'src/game/example/example.cc')
-rw-r--r-- | src/game/example/example.cc | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/src/game/example/example.cc b/src/game/example/example.cc index 9c3d55a..25daef7 100644 --- a/src/game/example/example.cc +++ b/src/game/example/example.cc @@ -10,15 +10,12 @@ namespace example { -Example::Example() : core::Module("example", "The Osirion Project Example", true) +core::Module *factory() { + return new Example(); } -Example::~Example() -{ -} - -void Example::init() +Example::Example() : core::Module("The Osirion Project Example", true) { /* Initialize engine game variables @@ -81,6 +78,14 @@ void Example::init() } +Example::~Example() +{ + /* + The world is automaticly deleted on shutdown, + but local variables have to be cleaned up + */ + zone = 0; +} void Example::player_connect(core::Player *player) { @@ -113,13 +118,4 @@ void Example::frame(float elapsed) } -void Example::shutdown() -{ - /* - The world is automaticly deleted on shutdown, - but local variables have to be cleaned up - */ - zone = 0; -} - } |