import { Logic } from "../../../script/common/base/Logic" ; import { LogicType , LogicEvent } from "../../../script/common/event/LogicEvent" ; import GameOneView from "./GameOneView" ; import { Manager } from "../../../script/common/manager/Manager" ; class GameOneLogic extends Logic { logicType : LogicType = LogicType . GAME ; onLoad ( ) { super . onLoad ( ) ; } protected bindingEvents ( ) { super . bindingEvents ( ) ; this . registerEvent ( LogicEvent . ENTER_GAME , this . onEnterGame ) ; } protected get bundle ( ) { return "gameOne" ; } private onEnterGame ( data ) { if ( data == this . bundle ) { Manager . uiManager . open ( { type : GameOneView , bundle : this . bundle } ) ; } } } Manager . logicManager . push ( GameOneLogic ) ;