新增Debug辅助Insist

This commit is contained in:
yhh
2021-01-18 19:54:41 +08:00
parent eca9ba7b82
commit 3e182db019
13 changed files with 163 additions and 67 deletions

View File

@@ -93,12 +93,27 @@ declare module es {
protected update(currentTime?: number): Promise<void>;
}
}
declare module es {
enum LogType {
error = 0,
warn = 1,
log = 2,
info = 3,
trace = 4
}
class Debug {
static warnIf(condition: boolean, format: string, ...args: any[]): void;
static warn(format: string, ...args: any[]): void;
static error(format: string, ...args: any[]): void;
static log(type: LogType, format: string, ...args: any[]): void;
}
}
declare module es {
/**
* 我们在这里存储了各种系统的默认颜色如对撞机调试渲染、Debug.drawText等。
* 命名方式尽可能采用CLASS-THING以明确它的使用位置
*/
class Debug {
class DebugDefault {
static debugText: number;
static colliderBounds: number;
static colliderEdge: number;