UNPKG

@dill-pixel/plugin-snap-physics

Version:

Snap Physics

28 lines 1.3 kB
import { Application } from 'dill-pixel'; import { Actor } from './Actor'; import { Entity } from './Entity'; import { Collision, EntityType } from './types'; export declare class Sensor<T = any, A extends Application = Application> extends Actor<T, A> { 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, Application<import('dill-pixel').DataSchema, import('dill-pixel').ActionContext, import('dill-pixel').Action, import('pixi.js').Renderer>>>): Collision[]; } //# sourceMappingURL=Sensor.d.ts.map