コード例 #1
0
 public virtual void keyProcess(float elapsedTime)
 {
     // 在准备退出当前流程时,不响应任何按键操作
     if (mCurProcedure != null && !mCurProcedure.isPreparingExit())
     {
         mCurProcedure.keyProcess(elapsedTime);
     }
 }
コード例 #2
0
 public virtual void keyProcess(float elapsedTime)
 {
     if (!mGameFramework.getEnableKeyboard())
     {
         return;
     }
     // 在准备退出当前流程时,不响应任何按键操作
     if (mCurProcedure != null && !mCurProcedure.isPreparingExit())
     {
         mCurProcedure.keyProcess(elapsedTime);
     }
 }
コード例 #3
0
    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());
        }
    }
コード例 #4
0
    public override void execute()
    {
        GameScene gameScene = mReceiver as GameScene;
        // 当流程正在准备跳转流程时,不允许再跳转
        SceneProcedure curProcedure = gameScene.getCurProcedure();

        if (curProcedure != null && curProcedure.isPreparingExit())
        {
            logError("procedure is preparing to change, can not change again!");
            return;
        }
        // 不能重复进入同一流程
        if (curProcedure != null && curProcedure.getProcedureType() == mProcedure)
        {
            return;
        }
        gameScene.changeProcedure(mProcedure, mIntent);
    }
    public override void execute()
    {
        var gameScene = mReceiver as GameScene;

        // 准备时间必须大于0
        if (mPrepareTime <= 0.0f)
        {
            logError("preapare time must be larger than 0!");
            return;
        }
        // 正在准备跳转时,不允许再次准备跳转
        SceneProcedure curProcedure = gameScene.getCurProcedure();

        if (curProcedure.isPreparingExit())
        {
            logError("procedure is preparing to exit, can not prepare again!");
            return;
        }
        gameScene.prepareChangeProcedure(mProcedure, mPrepareTime, mIntent);
    }
コード例 #6
0
    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());
        }
    }