public function onUpdate($tick) { parent::onUpdate($tick); if ($this->age > 20) { $this->kill(); $this->close(); } return true; }