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.
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.