3 changed files with 79 additions and 9 deletions
@ -0,0 +1,51 @@
|
||||
import { Event_Base } from "../event-base"; |
||||
import { EventManager } from "../event-manager"; |
||||
|
||||
/** |
||||
* 引擎状态发生变化 |
||||
*/ |
||||
export class Event_EngineStatusChange extends Event_Base { |
||||
|
||||
/** |
||||
* 变化的类型 |
||||
*/ |
||||
changeType: EngineStatusChangeType; |
||||
|
||||
|
||||
/** |
||||
* 派发事件 |
||||
* @param modeleInfo
|
||||
* @param modelChangeType
|
||||
*/ |
||||
static dispatch(changeType: EngineStatusChangeType) { |
||||
let eventData = new Event_EngineStatusChange(); |
||||
eventData.changeType = changeType; |
||||
EventManager.dispatch<Event_EngineStatusChange>(Event_EngineStatusChange, eventData); |
||||
} |
||||
|
||||
getTypeKey() { |
||||
return "EngineStatusChangeType"; |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 引擎状态变化类型 |
||||
*/ |
||||
export enum EngineStatusChangeType { |
||||
/** |
||||
* 初始化完成 |
||||
*/ |
||||
init, |
||||
/** |
||||
* 释放前 |
||||
*/ |
||||
dispose, |
||||
/** |
||||
* 暂停 |
||||
*/ |
||||
pause, |
||||
/** |
||||
* 开始或继续 |
||||
*/ |
||||
start, |
||||
} |
Loading…
Reference in new issue