| 21 | |
| 22 | === ModelTime |
| 23 | We start with ModelTime. This is NOT the MVC model but a class needed by the MVC model, therefore we explain it first. |
| 24 | The ModelTime is a listenable object containing the current time of the MVC models. All MVC models store a history, and at all times deliver the value stored at (or after) the current time. |
| 25 | |
| 26 | By changing the current time (using ModelTime.set()) all MVC values can be reverted to another point in time. All your MVC models should connect to the same ModelTime instance to ensure they all act consistently. |
| 27 | |
| 28 | You can use the DefaultModelTime if your MVC supports history/undo/redo, or use the NoModelTime if your MVC does not support history. |
| 29 | |
| 30 | |