@spibo-studio/spibo-studio
Version:
Spibo Studio is an HTML Canvas Library for creating adventure games
23 lines • 811 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var Boundaries = /** @class */ (function () {
function Boundaries(top, right, bottom, left) {
this.top = 0;
this.left = 0;
this.top = top;
this.right = right;
this.bottom = bottom;
this.left = left;
}
Boundaries.prototype.xIsWithinBoundaries = function (xPosition) {
var _a = this, left = _a.left, right = _a.right;
return left <= xPosition && xPosition <= right;
};
Boundaries.prototype.yIsWithinBoundaries = function (yPosition) {
var _a = this, top = _a.top, bottom = _a.bottom;
return top <= yPosition && yPosition <= bottom;
};
return Boundaries;
}());
exports.default = Boundaries;
//# sourceMappingURL=Boundaries.js.map