UNPKG

react-simple-game-engine

Version:

[WIP] not able to use in currently. <!-- Document cumming soon... -->

26 lines (25 loc) 829 B
var Sensor = /** @class */ (function () { function Sensor(entity, name, relativePosition, size, shape, body, debug, debugColor) { if (debug === void 0) { debug = false; } if (debugColor === void 0) { debugColor = [212, 200, 200, 100]; } this.entity = entity; this.name = name; this.relativePosition = relativePosition; this.size = size; this.shape = shape; this.body = body; this.debug = debug; this.debugColor = debugColor; this.body.sensor = this; this.body.entity = this.entity; } Object.defineProperty(Sensor.prototype, "position", { get: function () { return this.body.position; }, enumerable: false, configurable: true }); return Sensor; }()); export { Sensor };