Пример #1
0
        public void MoveForward()
        {
            Vector3 aheadEndPos = aheadGO.transform.localPosition;

            aheadEndPos.x -= aheadOffsetX;
            MapController.instance.Move(aheadGO.transform, aheadEndPos, null, aheadTime);

            Vector3 betweenEndPos = betweenGO.transform.localPosition;

            betweenEndPos.x -= betweenOffsetX;
            MapController.instance.Move(betweenGO.transform, betweenEndPos, null, betweenTime);

            Vector3 groundEndPos = groundGO.transform.localPosition;

            groundEndPos.x -= groundOffsetX;
            MapController.instance.Move(groundGO.transform, groundEndPos, () =>
            {
#if UNITY_EDITOR
                if (!MapController.instance.showMapButton)
#endif
                DataMessageHandler.DataMessage_FinishRun(CharacterType.Player);
            }, groundTime);

            Vector3 behindEndPos = behindGO.transform.localPosition;
            behindEndPos.x -= behindOffsetX;
            MapController.instance.Move(behindGO.transform, behindEndPos, null, behindTime);
        }
Пример #2
0
        private bool LOBBY2CLIENT_REALTIME_FIGHT_DATA_RESP_HANDLER(Observers.Interfaces.INotification note)
        {
            RealTimeFightDataResp resp = note.Body as RealTimeFightDataResp;

            FightProxy.instance.fightId    = resp.fightId;
            FightProxy.instance.randomSeed = resp.randomSeed;
            FightProxy.instance.SetData(resp.selfTeamData, resp.opponentTeamData);
            //FightController.instance.fightType = Enums.FightType.PVP;
            FightController.instance.fightType = Enums.FightType.ConsortiaFight;
            FightProxy.instance.consortiaOver  = false;
            FightProxy.instance.isHome         = resp.isHome;
            DataMessageHandler.DataMessage_ClearConsortiaSkills();
            Debugger.Log("start consortia fight --------------------------------------------------------------");
            _count = 0;
            for (int i = 0, count = resp.cmdList.Count; i < count; i++)
            {
                FightCmdSynResp       fightCmdSynResp = resp.cmdList[i];
                Dictionary <int, int> judgeDic        = new Dictionary <int, int>();
                Debugger.Log("character {0} skillId {1}", fightCmdSynResp.heroId, fightCmdSynResp.skillId);
                for (int j = 0, jCount = fightCmdSynResp.effectJudgeTypes.Count; j < jCount; j++)
                {
                    DoubleIntProto dip = fightCmdSynResp.effectJudgeTypes[j];
                    Debugger.Log("character {0} target {1} judgeType {2}", fightCmdSynResp.heroId, dip.value1, dip.value2);
                    judgeDic.Add(dip.value1, dip.value2);
                }
                _count++;
                ConsortiaFightData consortiaFightData = new ConsortiaFightData();
                consortiaFightData.id           = fightCmdSynResp.heroId;
                consortiaFightData.skillId      = fightCmdSynResp.skillId;
                consortiaFightData.judgeDic     = judgeDic;
                consortiaFightData.mechanicses  = fightCmdSynResp.mechanicsList;
                consortiaFightData.buffList     = fightCmdSynResp.newBuffList;
                consortiaFightData.delBuffList  = fightCmdSynResp.delBuffList;
                consortiaFightData.deadHeroList = fightCmdSynResp.diedHeroList;
                FightProxy.instance.AddConsortiaFightData(consortiaFightData);
                foreach (var item in consortiaFightData.mechanicses)
                {
                    foreach (var g in item.gethits)
                    {
                        Debugger.Log("damaged----------------character {0} hurted {1} remainHp  {2}", g.heroId, g.hurt, g.remainHp);
                    }
                }
                foreach (var did in consortiaFightData.deadHeroList)
                {
                    Debugger.Log("dead----------------character {0} skillId {1} deadid  {2}", fightCmdSynResp.heroId, fightCmdSynResp.skillId, did);
                }
                DataMessageHandler.DataMessage_OrderConsortiaSkill((uint)fightCmdSynResp.heroId, (uint)fightCmdSynResp.skillId, fightCmdSynResp.releaseTime, false);
            }

            Debugger.LogError("server skill count:{0}", _count);
            FightController.instance.PreReadyFight();
            return(true);
        }