moomooio-client
Version:
MooMooIO-Client is a client-side wrapper API designed for the game MooMoo.io. This package aims to provide a simple yet powerful API for creating clones, mods, or plugins for MooMoo.io.
22 lines (17 loc) • 718 B
text/typescript
import { z } from "zod";
const schema = z.tuple([z.number(), z.number()]);
/**
* @packet-id "sp"
* @description **TurretShoot** is a signal that is received when a nearby turret shoots.
* @member `turretID` is a unique identifier for the turret that shot.
* @member `angle` indicates the current angle the turret is facing (in radian).
*/
export default class TurretShoot {
public static readonly PACKET_ID = "sp";
public static readonly PACKET_NAME = "TurretShoot";
public readonly PACKET_NAME = "TurretShoot";
constructor(readonly turretID: number, readonly angle: number) {}
static parse(data: unknown): TurretShoot {
return new TurretShoot(...schema.parse(data));
}
}