forked from ducttape/ducttape-engine
-
Notifications
You must be signed in to change notification settings - Fork 1
The Basic Game Setup
opatut edited this page Jul 31, 2011
·
2 revisions
class SampleState : public dt::State {
public:
void OnInitialize() {
dt::Scene* scene = AddScene(new dt::Scene("sample_scene"));
dt::ResourceManager::Get()->AddResourceLocation("sample_dir","FileSystem", true);
Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
dt::Node* sample_node = scene->AddChildNode(new dt::Node("sample_node"));
dt::CameraComponent* cam = sample_node->AddComponent(new dt::CameraComponent("cam"));
// do more custom stuff here
}
};
int main(int argc, char** argv) {
dt::Game game;
game.Run(new Main(), argc, argv);
return 0;
}