2023-02-01 16:53:24 +00:00
|
|
|
import { Rectangle } from "../rects/rectangles";
|
|
|
|
|
2023-02-02 18:06:55 +00:00
|
|
|
export class Door {
|
|
|
|
private _day = -1;
|
|
|
|
public position: Rectangle;
|
|
|
|
|
|
|
|
constructor(position: Rectangle, day = -1) {
|
|
|
|
this.day = day;
|
|
|
|
this.position = position;
|
|
|
|
}
|
|
|
|
|
|
|
|
public get day(): number {
|
|
|
|
return this._day
|
|
|
|
}
|
|
|
|
|
|
|
|
public set day(day: number) {
|
|
|
|
this._day = Math.max(day, -1);
|
|
|
|
}
|
2023-02-01 16:53:24 +00:00
|
|
|
}
|