From 22fe8e9fb15691f5e64ceb8c36edc53e4fbc749c Mon Sep 17 00:00:00 2001 From: kts of kettek Date: Sat, 29 Jan 2022 23:48:04 -0800 Subject: [PATCH] Add sensor type --- Engine/src/live/Entity.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Engine/src/live/Entity.ts b/Engine/src/live/Entity.ts index 0950f63..8b0345c 100644 --- a/Engine/src/live/Entity.ts +++ b/Engine/src/live/Entity.ts @@ -3,6 +3,17 @@ import { SpriteInstance } from '../shared/sprites' import { WorldContext } from './World' import { Zone } from './Zone' +export class Sensor { + entity: Entity + fixture: planck.Fixture + type: 'short'|'long' + constructor(entity: Entity, fixture: planck.Fixture, type: 'short'|'long') { + this.entity = entity + this.fixture = fixture + this.type = type + } +} + export class Entity { sprite: SpriteInstance body?: planck.Body