, mass(1.0)
, size(1.0)
, birth(sim.Time())
-, death(0.0)
+, death(-1.0)
, on_death()
, removable(false)
, parents()
}
void Creature::Die() noexcept {
+ if (Dead()) return;
+
sim.SetDead(this);
death = sim.Time();
steering.Halt();
Remove();
}
+bool Creature::Dead() const noexcept {
+ return death > birth;
+}
+
void Creature::Remove() noexcept {
removable = true;
}