Add sensor type

This commit is contained in:
Ketchetwahmeegwun T. Southall 2022-01-29 23:48:04 -08:00
parent 968db6aa0b
commit 22fe8e9fb1

View File

@ -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