| 140 | } |
| 141 | |
| 142 | void Engine::clean() const |
| 143 | { |
| 144 | if (t_game) |
| 145 | { |
| 146 | t_game->trigger("End"); |
| 147 | } |
| 148 | if (m_triggers) |
| 149 | m_triggers->update(); |
| 150 | if (m_scene) |
| 151 | { |
| 152 | m_scene->clear(); |
| 153 | m_scene->update(); |
| 154 | } |
| 155 | Script::GameObjectDatabase::Clear(); |
| 156 | if (m_window) |
| 157 | m_window->close(); |
| 158 | |
| 159 | // m_lua->clear(); |
| 160 | } |
| 161 | |
| 162 | void Engine::purge() |
| 163 | { |