teeworlds
Version:
Library for (ingame) teeworlds bots.
60 lines (59 loc) • 4.37 kB
TypeScript
import { Client } from "../client";
import { EventEmitter } from "stream";
import { SnapshotItemTypes } from "../enums_types/types";
export declare interface SnapshotWrapper {
on(event: 'common', listener: (common: SnapshotItemTypes.Common) => void): this;
on(event: 'explosion', listener: (explosion: SnapshotItemTypes.Explosion) => void): this;
on(event: 'spawn', listener: (spawn: SnapshotItemTypes.Spawn) => void): this;
on(event: 'hammerhit', listener: (hammerhit: SnapshotItemTypes.HammerHit) => void): this;
on(event: 'death', listener: (death: SnapshotItemTypes.Death) => void): this;
on(event: 'sound_global', listener: (sound_global: SnapshotItemTypes.SoundGlobal) => void): this;
on(event: 'sound_world', listener: (sound_world: SnapshotItemTypes.SoundWorld) => void): this;
on(event: 'damage_indicator', listener: (damage_indicator: SnapshotItemTypes.DamageInd) => void): this;
}
export declare class SnapshotWrapper extends EventEmitter {
private _client;
constructor(_client: Client);
private getParsed;
private getAll;
getObjPlayerInput(player_id: number): SnapshotItemTypes.PlayerInput | undefined;
get AllObjPlayerInput(): SnapshotItemTypes.PlayerInput[];
getObjProjectile(id: number): SnapshotItemTypes.Projectile | undefined;
get AllProjectiles(): SnapshotItemTypes.Projectile[];
getObjLaser(id: number): SnapshotItemTypes.Laser | undefined;
get AllObjLaser(): SnapshotItemTypes.Laser[];
getObjPickup(id: number): SnapshotItemTypes.Pickup | undefined;
get AllObjPickup(): SnapshotItemTypes.Pickup[];
getObjFlag(id: number): SnapshotItemTypes.Flag | undefined;
get AllObjFlag(): SnapshotItemTypes.Flag[];
getObjGameInfo(id: number): SnapshotItemTypes.GameInfo | undefined;
get AllObjGameInfo(): SnapshotItemTypes.GameInfo[];
getObjGameData(id: number): SnapshotItemTypes.GameData | undefined;
get AllObjGameData(): SnapshotItemTypes.GameData[];
/** NOTICE: x & y positions always differ from the positions in the ingame debug menu. If you want the debug menu positions, you can calculate them like this: Math.round((myChar.character_core.x / 32) * 100)/100 */
getObjCharacterCore(player_id: number): SnapshotItemTypes.CharacterCore | undefined;
/** NOTICE: x & y positions always differ from the positions in the ingame debug menu. If you want the debug menu positions, you can calculate them like this: Math.round((myChar.character_core.x / 32) * 100)/100 */
get AllObjCharacterCore(): SnapshotItemTypes.CharacterCore[];
/** NOTICE: x & y positions always differ from the positions in the ingame debug menu. If you want the debug menu positions, you can calculate them like this: Math.round((myChar.character_core.x / 32) * 100)/100 */
getObjCharacter(player_id: number): SnapshotItemTypes.Character | undefined;
/** NOTICE: x & y positions always differ from the positions in the ingame debug menu. If you want the debug menu positions, you can calculate them like this: Math.round((myChar.character_core.x / 32) * 100)/100 */
get AllObjCharacter(): SnapshotItemTypes.Character[];
getObjPlayerInfo(player_id: number): SnapshotItemTypes.PlayerInfo | undefined;
get AllObjPlayerInfo(): SnapshotItemTypes.PlayerInfo[];
getObjClientInfo(player_id: number): SnapshotItemTypes.ClientInfo | undefined;
get AllObjClientInfo(): SnapshotItemTypes.ClientInfo[];
getObjSpectatorInfo(player_id: number): SnapshotItemTypes.SpectatorInfo | undefined;
get AllObjSpectatorInfo(): SnapshotItemTypes.SpectatorInfo[];
private getTypeId;
getObjExMyOwnObject(id: number): SnapshotItemTypes.MyOwnObject | undefined;
get AllObjExMyOwnObject(): SnapshotItemTypes.MyOwnObject[];
getObjExDDNetCharacter(id: number): SnapshotItemTypes.DDNetCharacter | undefined;
get AllObjExDDNetCharacter(): SnapshotItemTypes.DDNetCharacter[];
getObjExGameInfo(id: number): SnapshotItemTypes.GameInfoEx | undefined;
get AllObjExGameInfo(): SnapshotItemTypes.GameInfoEx[];
getObjExDDNetProjectile(id: number): SnapshotItemTypes.DDNetProjectile | undefined;
get AllObjExDDNetProjectile(): SnapshotItemTypes.DDNetProjectile[];
getObjExLaser(id: number): SnapshotItemTypes.DDNetLaser | undefined;
get AllObjExLaser(): SnapshotItemTypes.DDNetLaser[];
get OwnID(): number | undefined;
}