import { Blocks } from "../game/Blocks"; import { ZSMovement } from "../packets"; import TileRegistration from "../tiles/TileRegistration"; import { ZKeyKind } from "../types"; import { Player } from "./Player"; import { Vector } from "./Vector"; import { BlockIdCache } from "./BlockIdCache"; import { Rectangle } from "./Rectangle"; import { Keys } from "./Keys"; import { PhysicsEvents } from "./PhysicsEvents"; export declare class EEPhysics { private readonly world; readonly msPerTick: number; readonly events: import("../nanoevents").Emitter; readonly ids: BlockIdCache; readonly keys: Keys; ticks: number; start: number; private readonly ticksUntilAlive; private readonly ticksUntilFirstJump; private readonly ticksUntilNthJump; constructor(tiles: TileRegistration, world: Blocks, ticksPerSecond: number); updatePlayer(movement: ZSMovement, player: Player): void; update(elapsedMs: number, players: Player[]): void; tick(players: Player[]): void; tickPlayer(player: Player): void; /** * In EE physics, there is the concept of the `current` and `delayed` physics * blocks. * * The `current` physics block is the block you're currently standing * on, as of the current tick. * * The `delayed` physics block is the block you *were* standing on, as of two * to three ticks ago. */ private getPhysicsBlockOn; private getRespawnLocation; /** * God mode players have a different enough routine to warrant putting their * code into another function. */ tickGodPlayer(player: Player): void; performZoosts(self: Player, position: Vector, direction: Vector): void; playerIsColliding(self: Player, position: Vector): boolean; private normalizePlayerHitbox; collidesWithBlock(playerHitbox: Rectangle, player: Player, blockCoord: Vector): boolean; cornersOfPlayer(position: Vector): Vector[]; blockOutsideBounds(blockCoord: Vector): boolean; pointOutsideBounds(point: Vector): boolean; roundPositionToBlockCoords(position: Vector): Vector; willCollide(self: Player, playerHitbox: Rectangle, blockPosition: Vector): boolean; handleSurroundingBlocks(self: Player): void; triggerBlockAction(self: Player, activateZoost?: boolean): void; private triggerComplex; private getComplexInfo; private handleActionSigns; private handleActionCheckpoints; private handleActionHazards; keyIsOnForPlayer(player: Player, kind: ZKeyKind): boolean; getAllKeysOn(player: Player): ZKeyKind[]; }