Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PlayerSnapToEvent<RoomType>

Emitted when a player snaps to a position, without lerping. Typically emitted when the player is moves between vents.

Type parameters

  • RoomType: Hostable

Hierarchy

Implements

Index

Properties

Static eventName

eventName: "player.snapto" = ...

eventName

eventName: "player.snapto" = ...

Readonly message

message: undefined | SnapToMessage

The message that this event originated from.

Readonly newPosition

newPosition: Vector2

Readonly oldPosition

oldPosition: Vector2

Readonly player

player: PlayerData<RoomType>

The player that this event is for.

Readonly room

room: RoomType

The room or client that the event came from.

Accessors

alteredPosition

Constructors

constructor

Methods

revert

  • revert(): void

setPosition

  • setPosition(position: Vector2): void

Generated using TypeDoc