Connexion
FR
games/sorcery / src / Game / Overlay.php · commit 613f5fb
<?phpnamespace App\Game;/** The big banner (ROOM CLEARED / GAME OVER / VICTORY ...) with its animation state. */final class Overlay{    /** 0: hidden, 1: showing, 2: holding, 3: fading */    public int $show = 0;    public int $y = 0;    public int $x = 0;    public int $h = 0;    public int $w = 0;    public int $timer = 0;    public int $next = 0;    public function set(string $lines, int $p1, int $p2): void    {        $this->lines = $lines;        $this->pen1 = $p1;        $this->pen2 = $p2;        $this->show = 1;        $this->timer = 0;        $this->next = 0;    }    public string $lines = '';    public int $pen1 = 3;    public int $pen2 = 2;    /** the victory sequence also uses overlays as simple sprites */    public bool $visible = false;    public int $frame = 0;    public function clear(): void    {        $this->show = 0;        $this->timer = 0;        $this->lines = '';    }}