import { ModelInfo } from "src/app/babylon/model/info/model/model-info"; import { ModelChangeType } from "../../data-manager"; import { Event_Base } from "../event-base"; import { EventManager } from "../event-manager"; /** * modelInfo发生变化 */ export class Event_ModelInfoChange extends Event_Base { //属性 modeleInfo: ModelInfo; modelChangeType: ModelChangeType; setInfo(modelInfo: ModelInfo, modelChangeType: ModelChangeType) { this.modeleInfo = modelInfo; this.modelChangeType = modelChangeType; } /** * 派发事件 * @param modeleInfo * @param modelChangeType */ static dispatch(modeleInfo: ModelInfo, modelChangeType: ModelChangeType) { let eventData = new Event_ModelInfoChange(); eventData.setInfo(modeleInfo, modelChangeType); EventManager.dispatch(Event_ModelInfoChange, eventData); } }