transformice.js
Version:
Node.js client for Transformice with full Typescript support.
101 lines (100 loc) • 2.14 kB
TypeScript
import Client from "../client";
import ByteArray from "../utils/ByteArray";
import Player from "./Player";
/** Represents a player from the room. */
export default class RoomPlayer extends Player {
/**
* The player's gender.
*/
gender: number;
/**
* The current items and customisation of the player’s outfit as `1;0,0,0,0,0,0,0,0,0`.
*/
look: string;
/**
* The player's temporary code.
*/
pcode: number;
/**
* The player's title ID.
*/
title: number;
/**
* How many stars in the title.
*/
titleStars: number;
/**
* Whether or not the player has a cheese.
*/
hasCheese: boolean;
/**
* Whether or not the player is dead.
*/
isDead: boolean;
/**
* Whether or not the player is shaman.
*/
isShaman: boolean;
/**
* Whether or not the player is vampire.
*/
isVampire: boolean;
/**
* The player's score.
*/
score: number;
/**
* The player's mouse color.
*/
mouseColor: number;
/**
* The player's name color, By default : `-1`.
*/
nameColor: number;
/**
* The player's shaman color.
*/
shamanColor: number;
/**
* Whether or not the player is facing right.
*/
facingRight: boolean;
/**
* Whether or not the player is moving left.
*/
movingLeft: boolean;
/**
* Whether or not the player is moving right.
*/
movingRight: boolean;
/**
* The player’s X coordinate.
*/
x: number;
/**
* The player’s Y coordinate.
*/
y: number;
/**
* The player’s X velocity.
*/
vx: number;
/**
* The player’s Y velocity.
*/
vy: number;
/**
* Whether or not the player is in the air.
*/
isJumping: boolean;
/**
* @hidden
*/
constructor(client: Client);
/**
* Reads player data from a packet.
*
* @hidden
*/
read(packet: ByteArray): this;
}