thomasahle / TrinityProject

A mindblowing trainbased game for entire family
http://thomasahle.github.com/TrinityProject/
GNU General Public License v3.0
8 stars 3 forks source link

Add the ability to reset the track. #45

Closed EdShaw closed 12 years ago

EdShaw commented 12 years ago

Right now, if you make a mistake, you have to replace all the components again. This isn't very nice.

Would it be possible to remove all the trains and re-add them to the start?

Perhaps mTrack should have a nice removeTrains function, as each component keeps track of the trains it owns and a lot of state relating to them, which will need to be reset.

Alternatively, a way to discover the structure of the track, so we can recreate it. This might be a nice feature to help us make a level editor in the future, and also saving solutions.

EdShaw commented 12 years ago

This will go nicely with the ability to delete components. ;)

EdShaw commented 12 years ago

The fail screen should call this too, when dismissed.

MattPellegrini commented 12 years ago

Done, but only by resetting the level

trainBox.setLevel(mLevel.level.levelNumber);