2 Star 4 Fork 4

秋月/CocosCard

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
QM.d.ts 1.98 KB
一键复制 编辑 原始数据 按行查看 历史
秋月 提交于 2018-06-11 12:34 . 简单流程走完
/// <reference path="creator.d.ts" />
declare namespace QM {
/** 位置 */
enum QPoint {
/** 下 */
Bottom = 1,
/** 右 */
Right = 2,
/** 左 */
Left = 3,
}
type Card = {
name: string;
color?: string;
title: string;
};
var CName: string[];
var CColor: string[];
type QEvent = {
type: string;
cmd?: string;
data?: any;
};
class Socket {
static readonly Instance: Socket;
private readonly dial;
private websocket;
private interval;
private events;
constructor();
on(func: Function, target?: any): void;
off(func: Function, target?: any): void;
connect(): void;
frame(): void;
Send(data: string | object): void;
onOpen(ev: Event): void;
onMessage(ev: MessageEvent): void;
onClose(ev: CloseEvent): void;
onError(ev: Event): void;
bubbleUp(ev: QEvent): void;
}
type Character = {
uid: number;
username: string;
point: QPoint;
fd: number;
};
/**
* 房间管理
*/
class Room {
static readonly Instance: Room;
private _roomId;
private _landLord;
characters: Character[];
constructor();
roomId: number;
landLord: number;
addCharacter(ch: Character): false | undefined;
getCharacterForPoint(point: QPoint): Character | null;
getCharacterForUid(uid: number): Character | null;
in_Character(ch: Character): boolean;
removeCharacter(ch: Character): Character | null;
getCharacters(): Character[];
clear(): void;
readonly length: number;
}
var User: Character;
class JSManager {
static readonly instance: JSManager;
objs: {
[key: string]: any;
};
setClass<T>(fun: Function, obj: T): void;
getClass<T>(fun: Function): T;
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/qmq/CocosCard.git
git@gitee.com:qmq/CocosCard.git
qmq
CocosCard
CocosCard
master

搜索帮助