minLight = World::minSurroundingLight($sec, $sec->lightLevel); $g->maxLight = $sec->lightLevel; $sec->special = 0; return $g; } public function think(World $w): void { $s = $this->sector; if ($this->direction === -1) { $s->lightLevel -= self::GLOWSPEED; if ($s->lightLevel <= $this->minLight) { $s->lightLevel += self::GLOWSPEED; $this->direction = 1; } } else { $s->lightLevel += self::GLOWSPEED; if ($s->lightLevel >= $this->maxLight) { $s->lightLevel -= self::GLOWSPEED; $this->direction = -1; } } } public function isRemoved(): bool { return false; } }