Hi
How I do I load a new map? e.g. the player has completed the first level and now wants to move onto the second one.
At the moment when I try loading the second map the game crashes. I'm using a switch statement to state we're now entering the second level.
any help?
Loading a new level?
-
- Posts: 23
- Joined: Thu Jan 29, 2004 4:07 pm
- Location: Birmingham, UK
- Contact:
Code: Select all
smgr->clear();
I recommend you incorporate this into your own function so that any other information ( timers, counters, arrays containing pointers to scene nodes ) is saved if necessary and cleared before removing all the scene nodes.
This is what I am planning to put in my code to clear the whole interface:
Code: Select all
bool isLevelCleared = level[currentLevel]->clearLevel();
if ( isLevelCleared == true )
requestGameState(NextLevel);
else
// Display level clearance error
-
- Posts: 23
- Joined: Thu Jan 29, 2004 4:07 pm
- Location: Birmingham, UK
- Contact:
-
- Posts: 23
- Joined: Thu Jan 29, 2004 4:07 pm
- Location: Birmingham, UK
- Contact: