simplescenes demo default test

jwalkent

20-07-2008 15:23:40

i'm trying to figure out how to get a specific test to start up as the default test in the simple scenes demo.

i succeeded by using

else
{
delete _test;

_test = new SimpleScenes_Ninja(_world);

changed = true;
}

but the scene keeps resetting so i cant move the character anywhere. i'm assuming this is because the _test keeps deleting. i tried getting rid of that command but i get an error so is there a way to tell it to delete _test just once?

Christian24

21-07-2008 17:21:46

I suceeded by using:


void SimpleScenesApplication::createScene(void)
{
.....
// Initialise stuff
_test = 0;
_delay = 1.0;
delete _test;
_test = new SimpleScenes_Zombie(_world); // Initialise stuff
_test = 0;
_delay = 1.0;
delete _test;
_test = new SimpleScenes_Zombie(_world);
}