localPlayer
The LocalPlayer class represents the client's own player within the world. It holds a reference to the player's NetworkEntity.
LocalPlayer private
Bound to game.world as game.world.localPlayer.
Properties
| Name | Type | Description |
|---|---|---|
entity | NetworkEntity | The network entity associated with the local player. |
Methods
setEntity()
ts
function setEntity(entity: NetworkEntity): voidStores a reference to the player's NetworkEntity.
getEntity()
ts
function getEntity(): NetworkEntityReturns the player's NetworkEntity.
setTargetTick()
ts
function setTargetTick(tick: object): voidForwards the given tick data to the UI via game.ui.setPlayerTick().