import { GameManager } from "./GameManager";

declare global {
    interface Window {
        /**全局游戏管理者 */
        gm: GameManager;
    }
    /**玩家匹配信息 */
    interface MatchPlayerInfo {
        nickname: string;
        gender: number;
        avatarUrl: string;
    }
    /**游戏系统状态 */
    interface GameSystemState {
        time: number;
        playerStates: PlayerState[];
        winPlayerIndex: number;
        readyComplete: boolean;
        gameOver: boolean;
    }
    /**玩家状态 */
    interface PlayerState {
        index: number;
        moveX: number;
        speedX: number;
        lastAccTime: number;
        accCount: number;
    }
    /**玩家输入-加速 */
    interface PlayerAccInput {
        type: number;
        playerIndex: number;
    }
    /**玩家输入-跳跃 */
    interface PlayerJumpInput {
        type: number;
        playerIndex: number;
    }
    /**游戏系统输入（玩家输入都归纳为系统输入） */
    type GameSystemInput = PlayerAccInput | PlayerJumpInput
}
/**游戏事件 */
export enum GameEventEnum {
    UniAppGameInit = "UniAppGameInit",
    MatchEnd = "MatchEnd",
    GameStart = "GameStart",
    ReadyGo = "ReadyGo",
    GameEnd = "GameEnd",
    GameWin = "GameWin",
    GameLose = "GameLose",
}
/**游戏系统输入 */
export enum GameSystemInputType {
    PlayerAcc = 0,
    PlayerJump = 1
}
