UNPKG

@dill-pixel/plugin-snap-physics

Version:

Snap Physics

27 lines 1.08 kB
import { Actor } from './Actor'; import { Entity } from './Entity'; import { Collision, EntityType } from './types'; export declare class Sensor<T = any> extends Actor<T> { type: string; isSensor: boolean; isColliding: boolean; /** * Types of entities that can pass through this sensor without triggering a collision * All actors by default, so sensors can still be pushed by and ride on solids, * but we don't check collisions with other actors in the moveX and moveY methods * You can call "resolveAllCollisions" to still resolve collisions for actors, * but not have this sensor be "pushed" by them */ passThroughTypes: EntityType[]; getCollideables<T extends Entity = Entity>(): Set<T>; added(): void; removed(): void; fixedUpdate(_deltaTime?: number): void; /** * Resolve all collisions for this sensor * ignores passThroughTypes */ resolveAllCollisions(): null | Collision[]; getOuterCollisions(collideables?: Set<Entity<any>>): Collision[]; } //# sourceMappingURL=Sensor.d.ts.map