public override void execute() { GameScene gameScene = mReceiver as GameScene; // 当流程正在准备跳转流程时,不允许再跳转 SceneProcedure curProcedure = gameScene.getCurSceneProcedure(); if (curProcedure != null && curProcedure.isPreparingExit()) { UnityUtility.logError("procedure is preparing to change, can not change again!"); } else { gameScene.changeProcedure(mProcedure, mIntent); mLogSystem.logProcedure("进入流程 : " + mProcedure.ToString()); } }
public override void execute() { GameScene gameScene = mReceiver as GameScene; // 准备时间必须大于0 SceneProcedure curProcedure = gameScene.getCurSceneProcedure(); if (mPrepareTime <= 0.0f) { UnityUtility.logError("preapare time must be larger than 0!"); } // 正在准备跳转时,不允许再次准备跳转 else if (curProcedure.isPreparingExit()) { UnityUtility.logError("procedure is preparing to exit, can not prepare again!"); } else { gameScene.prepareChangeProcedure(mProcedure, mPrepareTime, mIntent); mLogSystem.logProcedure("准备进入流程 : " + mProcedure.ToString()); } }