Ejemplo n.º 1
0
        private void AddNewMsg(SiderTipMsg _msg)
        {
            if (this.msgShowQueue.Count >= 3)
            {
                this.msgWaitQueue.Enqueue(_msg);
                return;
            }
            SiderTipCtrl siderTipCtrl = this.msgFreeQueue.Dequeue();

            siderTipCtrl.defaultPos = new Vector3(0f, (float)this.counter * -this.cellHeight, 0f);
            this.counter++;
            this.cMgr.StartCoroutine(this.ShowMsg(_msg, siderTipCtrl), true);
            this.msgShowQueue.Enqueue(siderTipCtrl);
        }
Ejemplo n.º 2
0
 private IEnumerator ShowMsg(SiderTipMsg _msg, SiderTipCtrl _tweenComp)
 {
     SiderTipsModule.< ShowMsg > c__IteratorDE <ShowMsg> c__IteratorDE = new SiderTipsModule.< ShowMsg > c__IteratorDE();
Ejemplo n.º 3
0
        public void SetData(SiderTipMsg _msg)
        {
            if (_msg.isTeamSign)
            {
                this.background.color         = new Color32(0, 41, 103, 255);
                this.attacker.border.color    = new Color32(24, 154, 25, 255);
                this.attacker.icon.spriteName = _msg.killerSpriteName;
                this.victim.border.gameObject.SetActive(false);
                this.signIcon.alpha = 1f;
                switch (_msg.signType)
                {
                case TeamSignalType.Danger:
                    this.actionIcon.spriteName = "HUD_left_icons_danger";
                    this.signIcon.spriteName   = "HUD_text_danger";
                    break;

                case TeamSignalType.Miss:
                    this.actionIcon.spriteName = "HUD_left_icons_missing";
                    this.signIcon.spriteName   = "HUD_text_missing";
                    break;

                case TeamSignalType.Converge:
                    this.actionIcon.spriteName = "HUD_left_icons_help";
                    this.signIcon.spriteName   = "HUD_text_help";
                    break;

                case TeamSignalType.Fire:
                    this.actionIcon.spriteName = "HUD_left_icons_gather";
                    this.signIcon.spriteName   = "HUD_text_gather";
                    break;

                case TeamSignalType.Defense:
                    this.actionIcon.spriteName = "HUD_left_icons_protect";
                    this.signIcon.spriteName   = "HUD_text_protect";
                    break;

                case TeamSignalType.Goto:
                    this.actionIcon.spriteName = "HUD_left_icons_way";
                    this.signIcon.spriteName   = "HUD_text_way";
                    break;
                }
                this.actionIcon.MakePixelPerfect();
                this.signIcon.MakePixelPerfect();
                for (int i = 0; i < this.assist.Count; i++)
                {
                    this.assist[i].border.SetActive(false);
                }
            }
            else
            {
                this.actionIcon.spriteName = "HUD_kill_icon";
                this.actionIcon.MakePixelPerfect();
                this.signIcon.alpha = 0.002f;
                this.victim.border.gameObject.SetActive(true);
                this.attacker.icon.spriteName = _msg.killerSpriteName;
                this.victim.icon.spriteName   = _msg.victimSpriteName;
                Color32 c;
                if (_msg.isAllyTip)
                {
                    this.background.color = new Color32(0, 127, 0, 255);
                    c = new Color32(24, 154, 25, 255);
                    this.attacker.border.color = c;
                    this.victim.border.color   = new Color32(219, 0, 27, 255);
                }
                else
                {
                    this.background.color = new Color32(129, 0, 0, 255);
                    c = new Color32(219, 0, 27, 255);
                    this.attacker.border.color = c;
                    this.victim.border.color   = new Color32(24, 154, 25, 255);
                }
                if (LevelManager.m_CurLevel.Is3V3V3())
                {
                    switch (_msg.attackerTeam)
                    {
                    case TeamType.LM:
                        c = SiderTipCtrl.Magenta;
                        break;

                    case TeamType.BL:
                        c = SiderTipCtrl.Cyan;
                        break;

                    case TeamType.Team_3:
                        c = SiderTipCtrl.Yellow_T3;
                        break;
                    }
                    this.attacker.border.color = c;
                    switch (_msg.victimTeam)
                    {
                    case TeamType.LM:
                        this.victim.border.color = SiderTipCtrl.Magenta;
                        break;

                    case TeamType.BL:
                        this.victim.border.color = SiderTipCtrl.Cyan;
                        break;

                    case TeamType.Team_3:
                        this.victim.border.color = SiderTipCtrl.Yellow_T3;
                        break;
                    }
                }
                if (_msg.assistSpriteName.Count <= this.assist.Count)
                {
                    for (int j = 0; j < _msg.assistSpriteName.Count; j++)
                    {
                        this.assist[j].border.SetActive(true);
                        this.assist[j].border.color    = c;
                        this.assist[j].icon.spriteName = _msg.assistSpriteName[j];
                    }
                    for (int k = _msg.assistSpriteName.Count; k < this.assist.Count; k++)
                    {
                        this.assist[k].border.SetActive(false);
                    }
                }
                else
                {
                    ClientLogger.Error("助攻人数不正常");
                    for (int l = 0; l < this.assist.Count; l++)
                    {
                        this.assist[l].border.SetActive(false);
                    }
                }
            }
        }