@battle-racing/br-common-lib
Version:
Common library for all Battle Racing Repositorios
37 lines (36 loc) • 1.15 kB
TypeScript
import type { ColorName } from '../color';
import type { DamageEffectName } from '../damage';
import type { GameType } from '../game';
import type { GameTrack } from '../gameTrack';
import type { KartHardwareState } from '../hardware';
import type { PowerUpName } from '../powerUp';
import type { KartShield } from './KartShield';
import type { KartStatus } from './KartStatus';
interface KartGame {
id: number;
type: GameType;
}
export interface Kart {
/** Unique ID by kart */
guid: string;
/** kartGuid assigned by Game Track (multiple karts could have the same Id) */
id: number;
mac: string;
hostname: string;
isConnected: boolean;
status: KartStatus;
shield: KartShield;
gameTrackId: GameTrack['id'];
color: ColorName;
number: number;
currentGame?: KartGame | null;
description?: string | null;
/**
* In testing Mode, the kart should be listening to the hardware status
*/
isSubscribedToHardwareStatus: boolean;
hardwareState?: KartHardwareState | null;
currentPowerUp?: PowerUpName | null;
currentDamage?: DamageEffectName | null;
}
export {};