Пример #1
0
    public override void execute(Fix64 deltaTime)
    {
        base.execute(deltaTime);
        switch (subState)
        {
        case SubState.Wait:
            if (timer < game.fbWorld.config.replayTimeAfterGoal)
            {
                return;
            }
            game.fbWorld.setEnableBT(true);
            LogicEvent.fire2Rendering("onBeginGoalShow");
            resetTimer();
            subState = SubState.Show;
            return;

        case SubState.Show:
            if (timer < game.fbWorld.config.goalShowTime)
            {
                return;
            }
            game.onShowReplayLogo();
            resetTimer();
            subState = SubState.ShowLogo;
            return;

        case SubState.ShowLogo:
            if (timer < (Fix64)0.3f)
            {
                return;
            }
            game.changeState(GameState.Replay);
            return;
        }
    }
Пример #2
0
 void changeLockState(bool isLock)
 {
     if (mainActor)
     {
         LogicEvent.fire2Rendering("onEnableRecordInput", isLock);
     }
 }
Пример #3
0
        public static void doDone(BallLastDetachAction actionObject)
        {
            var scene = SceneViews.instance.getCurFBScene();

            scene.ballDetach(actionObject.objectID);
            LogicEvent.fire2Rendering("onBallLastDetached", actionObject.objectID);
        }
Пример #4
0
    public void onBeginReplay(uint beginFrame,
                              uint endFrame,
                              ushort goalTime,
                              ushort replayTime,
                              ulong goaler,
                              Location door,
                              ushort blueScore,
                              ushort redScore,
                              uint gkId,
                              float positionRandomValue,
                              float shootRandomValue,
                              float goalRandomValue,
                              bool selfGoal)
    {
        generateRenderAction <RAL.ReplayBeginAction>(beginFrame,
                                                     endFrame,
                                                     goalTime,
                                                     replayTime,
                                                     goaler,
                                                     door,
                                                     blueScore,
                                                     redScore,
                                                     gkId,
                                                     positionRandomValue,
                                                     shootRandomValue,
                                                     goalRandomValue,
                                                     goalTeam);

        LogicEvent.fire2Rendering("onBeginReplay", door, gkId, positionRandomValue, shootRandomValue, goalRandomValue);
    }
Пример #5
0
        public static void doDone(GoalAction actionObject)
        {
            LogicEvent.fire2Rendering("onBallGoal", actionObject.team, actionObject.door, actionObject.objectID);
            LogicEvent.fire2Lua("onGoal", actionObject.door == Location.kLeftDoor);
            var scene = SceneViews.instance.getCurFBScene();

            scene.recordingAnimatorState = false;
            scene.setActorsAnimatorController(true);
        }
Пример #6
0
 public void onGameReady(CampType camp)
 {
     LogicEvent.fire2Rendering("onGameReady", camp);
     if (m_currentRenderActionList != null)
     {
         generateRenderAction <RAL.GameReadyAction>();
     }
     else
     {
         generateRenderActionToTargetList <RAL.GameReadyAction>(RenderActionListType.kLogicBefore);
     }
 }
Пример #7
0
    IEnumerator asynLoadScene(string name)
    {
        //Debug.Log("asynLoadScene:" +name);
        var asyn = SceneManager.LoadSceneAsync(name, LoadSceneMode.Additive);

        yield return(asyn);

        //Debug.Log("LoadSceneAsync done" + name);

        Scene scene = SceneManager.GetSceneByName(name);

        if (scene.IsValid())
        {
            SceneManager.SetActiveScene(scene);
        }

        //Debug.Log("asynLoadScene is done");
        LogicEvent.fire2Rendering("onSceneLoaded");
    }
Пример #8
0
    public override void execute(Fix64 deltaTime)
    {
        base.execute(deltaTime);
        switch (subState)
        {
        case SubState.Wait:
            if (timer < game.fbWorld.config.showEnemyMoment)
            {
                return;
            }
            var enemys = game.fbWorld.getEnemys(game.mainActorTeam, false);
            if (enemys != null && enemys.Count > 0)
            {
                var randomIdx = (int)(enemys.Count * (float)game.fbWorld.randomUnit);
                if (randomIdx >= enemys.Count)
                {
                    randomIdx = enemys.Count - 1;
                }
                var randomEnemy = enemys[randomIdx];
                LogicEvent.fire2Rendering("onShowEnemy", randomEnemy.id);
            }
            subState = SubState.ShowEnemy;
            return;

        case SubState.ShowEnemy:
            if (timer < game.fbWorld.config.enterShowTime)
            {
                return;
            }
            LogicEvent.fire2Lua("onEnterShowFinished", (int)game.mainActorTeam);
            LogicEvent.fire("onWaitForSync");
            subState = SubState.WaitForSync;
            return;

        case SubState.WaitForSync:
            return;
        }
    }
Пример #9
0
 //释放焦点
 public virtual void releaseFocus(ActorView actor)
 {
     LogicEvent.fire2Rendering("onEndKillerSkill", actor);
 }
Пример #10
0
 //请求焦点
 public virtual void requestFocus(ActorView actor)
 {
     actor.playSkillEffect();
     LogicEvent.fire2Rendering("onBeginKillerSkill", actor);
 }
Пример #11
0
 public static void doDone(HitCompletedAction actionObject)
 {
     LogicEvent.fire2Rendering("onHitCompleted");
 }
Пример #12
0
 public static void doDone(EndHitAction actionObject)
 {
     LogicEvent.fire2Rendering("onEndHit");
 }
Пример #13
0
        public static void doDone(BeginHitAction actionObject)
        {
            var scene = SceneViews.instance.getCurFBScene();

            LogicEvent.fire2Rendering("onBeginHit", scene.getActor(actionObject.objectID), scene.getActor(actionObject.victim));
        }
Пример #14
0
 public void onEnableRecordInput(bool enable)
 {
     LogicEvent.fire2Rendering("onEnableRecordInput", enable);
 }