| 25 | } |
| 26 | |
| 27 | void Doodad::update(GameState &state, int ticks) |
| 28 | { |
| 29 | if (!temporary) |
| 30 | return; |
| 31 | age += ticks; |
| 32 | if (age >= lifetime) |
| 33 | { |
| 34 | if (this->type->repeatable) |
| 35 | { |
| 36 | age = 0; |
| 37 | return; |
| 38 | } |
| 39 | this->remove(state); |
| 40 | return; |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | void Doodad::remove(GameState &state) |
| 45 | { |