Class PlayerMoveEvent<RoomType>

Emitted when a player moves.

Type Parameters

Hierarchy

  • BasicEvent
    • PlayerMoveEvent

Implements

Properties

eventName: "player.move"
eventName: "player.move"
player: PlayerData<RoomType>

The player that this event is for.

position: Vector2

The new position of the player.

room: RoomType

The room or client that the event came from.

velocity: Vector2

The velocity of the player.

Constructors

  • Type Parameters

    Parameters

    • room: RoomType
    • player: PlayerData<RoomType>
    • position: Vector2

      The new position of the player.

    • velocity: Vector2

      The velocity of the player.

    Returns PlayerMoveEvent<RoomType>

Generated using TypeDoc