登录
ZH
games/sorcery / src / Data / Level.php · commit 613f5fb
<?phpnamespace App\Data;/** A level pack: rooms, name, description, its own tile sheet, the extras. */final class Level{    public string $key = '';    public string $name = '';    /** @var string[] description lines */    public array $description = [];    /** @var RoomDef[] index = room number */    public array $rooms = [];    /** @var Extra[] */    public array $extras = [];    public bool $original = false;    public int $startRoom = 0;    public int $startY = 0;    public int $startX = 0;    public int $goal = 0;    public bool $dark = false;    public bool $hasSky = false;    /** @var int[] */    public array $sky = [5, 8, 30, 27, 14, 56];    public bool $stars = true;    public function room(int $n): ?RoomDef    {        return $this->rooms[$n] ?? null;    }}