Esempio n. 1
0
        private static void CreateNotifyEffect(TeamSignalType signalType, Position pos)
        {
            string signalPerform = TeamSignalManager.GetSignalPerform(signalType);

            if (signalType == TeamSignalType.Fire || signalType == TeamSignalType.Defense)
            {
                return;
            }
            if (string.IsNullOrEmpty(signalPerform))
            {
                return;
            }
            SysSkillPerformVo dataById = BaseDataMgr.instance.GetDataById <SysSkillPerformVo>(signalPerform);

            if (dataById == null)
            {
                ClientLogger.Error("cannot found SysSkillPerformVo #" + signalPerform);
            }
            else
            {
                ResourceHandle resourceHandle = MapManager.Instance.SpawnResourceHandle(dataById.effect_id, new Vector3(pos.x, pos.y, pos.z), Quaternion.identity, 0);
                if (resourceHandle != null)
                {
                    resourceHandle.DelayRelease(1.8f);
                }
                else
                {
                    ClientLogger.Error("SpawnEffect failed #" + dataById.effect_id);
                }
            }
        }
Esempio n. 2
0
 public static void Begin(TeamSignalType mode)
 {
     TeamSignalManager.IsBegin = true;
     TeamSignalManager.CurMode = mode;
     CtrlManager.OpenWindow(WindowID.TeamSignalView, null);
     Singleton <MiniMapView> .Instance.BeginTeamSignal();
 }
Esempio n. 3
0
        private static string GetFriendlyText(TeamSignalType signalType)
        {
            switch (signalType)
            {
            case TeamSignalType.Danger:
                return(LanguageManager.Instance.GetStringById("BattleTeamSignalType_Danger"));

            case TeamSignalType.Miss:
                return(LanguageManager.Instance.GetStringById("BattleTeamSignalType_TheEnemyDisappeared"));

            case TeamSignalType.Converge:
                return(LanguageManager.Instance.GetStringById("BattleTeamSignalType_Set"));

            case TeamSignalType.Fire:
                return(LanguageManager.Instance.GetStringById("BattleTeamSignalType_Attack"));

            case TeamSignalType.Defense:
                return(LanguageManager.Instance.GetStringById("BattleTeamSignalType_Defense"));

            case TeamSignalType.Goto:
                return(LanguageManager.Instance.GetStringById("BattleTeamSignalType_Flee"));

            default:
                return(string.Empty);
            }
        }
    public static void CallBattleMsg_SiderTipsModule_Signal(string npcId1, TeamSignalType signalType)
    {
        SiderTipsModule module = Singleton <HUDModuleManager> .Instance.GetModule <SiderTipsModule>(EHUDModule.SiderTips);

        if (module != null)
        {
            module.AddSiderTip_Signal(npcId1, signalType);
        }
    }
Esempio n. 5
0
 public static void SendTeamTargetNotify(TeamSignalType type, int unitId)
 {
     SendMsgManager.Instance.SendPvpMsg(PvpCode.C2P_NotifyTeamTarget, SerializeHelper.Serialize <NotifyTeamTarget>(new NotifyTeamTarget
     {
         senderId   = Singleton <PvpManager> .Instance.MyLobbyUserId,
         signalType = (byte)type,
         targetId   = unitId
     }));
 }
Esempio n. 6
0
        private static void CheckSignalOverride(int senderId, TeamSignalType signalType, PlayEffectAction action)
        {
            PlayEffectAction playEffectAction;

            if (TeamSignalManager._lastAttackSignals.TryGetValue(senderId, out playEffectAction) && playEffectAction != null)
            {
                playEffectAction.Stop();
            }
            TeamSignalManager._lastAttackSignals[senderId] = action;
        }
Esempio n. 7
0
 private static void TryUpdateCd(int senderId, TeamSignalType signalType)
 {
     if (senderId == Singleton <PvpManager> .Instance.MyLobbyUserId)
     {
         TeamSignalManager._cdKeeper.Trigger();
         if (TeamSignalManager._cdKeeper.IsCd())
         {
             MobaMessageManager.ExecuteMsg(ClientC2C.TeamSignalCoolDown, null, 0f);
         }
     }
 }
 public void Show(TeamSignalType type)
 {
     foreach (GameObject current in this._signalIcons)
     {
         if (current)
         {
             current.SetActive(false);
         }
     }
     this._signalIcons[(int)type].transform.localEulerAngles = new Vector3(0f, 0f, -base.transform.parent.transform.localEulerAngles.z);
     this._signalIcons[(int)type].SetActive(true);
 }
Esempio n. 9
0
        public static void Process(NotifyTeamPos info)
        {
            int            senderId   = info.senderId;
            TeamSignalType signalType = (TeamSignalType)info.signalType;
            Position       pos        = info.pos;

            if (pos == null)
            {
                return;
            }
            if (!Singleton <PvpManager> .Instance.IsOurPlayer(senderId))
            {
                return;
            }
            TeamSignalManager.TryUpdateCd(senderId, signalType);
            TeamSignalManager.CreateNotifyEffect(signalType, pos);
            switch (signalType)
            {
            case TeamSignalType.Danger:
                AudioMgr.Play("Play_SignalRisk", null, false, false);
                AudioMgr.Play("Play_CN_Risk", null, false, false);
                break;

            case TeamSignalType.Miss:
                AudioMgr.Play("Play_SignalMiss", null, false, false);
                break;

            case TeamSignalType.Converge:
                AudioMgr.Play("Play_SignalHelp", null, false, false);
                AudioMgr.Play("Play_CN_Help", null, false, false);
                break;

            case TeamSignalType.Fire:
                AudioMgr.Play("Play_SignalAttack", null, false, false);
                AudioMgr.Play("Play_CN_Gather", null, false, false);
                break;

            case TeamSignalType.Defense:
                AudioMgr.Play("Play_SignalDefense", null, false, false);
                break;

            case TeamSignalType.Goto:
                AudioMgr.Play("Play_SignalOntheWay", null, false, false);
                break;
            }
            Singleton <MiniMapView> .Instance.ShowTeamSignal(senderId, signalType, new Vector3(pos.x, pos.y, pos.z));

            string playerHero = Singleton <PvpManager> .Instance.GetPlayerHero(senderId);

            HUDModuleMsgTools.CallBattleMsg_SiderTipsModule_Signal(playerHero, signalType);
        }
Esempio n. 10
0
 public static void SendTeamPosNotify(TeamSignalType type, Vector3 pos)
 {
     SendMsgManager.Instance.SendPvpMsg(PvpCode.C2P_NotifyTeamPos, SerializeHelper.Serialize <NotifyTeamPos>(new NotifyTeamPos
     {
         senderId   = Singleton <PvpManager> .Instance.MyLobbyUserId,
         signalType = (byte)type,
         pos        = new Position
         {
             x = pos.x,
             y = pos.y,
             z = pos.z
         }
     }));
 }
 public void ShowRightSignalView_Internal(float duration, string npcId1, TeamSignalType signal)
 {
     if (this.rightMsgObjList.Count <= 4)
     {
         this.cMgr.StartCoroutine(this.RightSignalView_Coroutinue(npcId1, signal, duration), true);
     }
     else
     {
         this.rightMsgWaitingList.Add(new KillInfosModule.RightSignalMsg
         {
             duration = duration,
             signal   = signal,
             npcId    = npcId1
         });
     }
 }
Esempio n. 12
0
        private void OnClickAboveView(GameObject go)
        {
            this.Log("OnClickAboveView");
            Vector3 mousePosition = Input.mousePosition;

            if (this.IsClickBadWindow(mousePosition))
            {
                this.Log("click ui");
                TeamSignalManager.End();
                return;
            }
            TeamSignalType curMode = TeamSignalManager.CurMode;

            if (curMode == TeamSignalType.Defense)
            {
                Units units = this.PickupTarget();
                if (units != null && units.isMyTeam)
                {
                    TeamSignalManager.TrySendTeamTargetNotify(curMode, units.unique_id);
                }
            }
            else if (curMode == TeamSignalType.Fire || curMode == TeamSignalType.Converge)
            {
                Units units2 = this.PickupTarget();
                if (units2 != null && units2.isEnemy)
                {
                    TeamSignalManager.TrySendTeamTargetNotify(TeamSignalType.Fire, units2.unique_id);
                }
                else
                {
                    Vector3?vector = this.PickupPos();
                    if (vector.HasValue)
                    {
                        TeamSignalManager.TrySendTeamPosNotify(TeamSignalType.Converge, vector.Value);
                    }
                }
            }
            else
            {
                Vector3?vector2 = this.PickupPos();
                if (vector2.HasValue)
                {
                    TeamSignalManager.TrySendTeamPosNotify(curMode, vector2.Value);
                }
            }
            TeamSignalManager.End();
        }
Esempio n. 13
0
        public void AddSiderTip_Signal(string npcId1, TeamSignalType type)
        {
            string spriteNameById = Singleton <HUDModuleManager> .Instance.GetSpriteNameById(npcId1);

            this.AddNewMsg(new SiderTipMsg(spriteNameById, type));
        }
Esempio n. 14
0
 public SiderTipMsg(string _sender, TeamSignalType _signType)
 {
     this.isTeamSign       = true;
     this.signType         = _signType;
     this.killerSpriteName = _sender;
 }
Esempio n. 15
0
 public static bool TrySendTeamTargetNotify(TeamSignalType type, int unitId)
 {
     PvpEvent.SendTeamTargetNotify(type, unitId);
     return(true);
 }
Esempio n. 16
0
 public static bool TrySendTeamPosNotify(TeamSignalType type, Vector3 pos)
 {
     PvpEvent.SendTeamPosNotify(type, pos);
     return(true);
 }
Esempio n. 17
0
 public static string GetSignalPerform(TeamSignalType type)
 {
     return((!TeamSignalManager._signal2FxMap.ContainsKey(type)) ? string.Empty : TeamSignalManager._signal2FxMap[type]);
 }