Ejemplo n.º 1
0
    private void DoPowerChange(BattlePowerChangeVO _vo, Action _del)
    {
        for (int i = 0; i < _vo.pos.Count; i++)
        {
            int pos = _vo.pos[i];

            int powerChange = _vo.powerChange[i];

            bool isDizz = _vo.isDizz[i];

            HeroBattle hero = heroDic[pos];

            hero.RefreshPower();

            string str;

            Color color;

            if (powerChange > 0)
            {
                str = "+" + ((int)(powerChange / 100)).ToString();

                color = Color.blue;
            }
            else
            {
                if (isDizz)
                {
                    str = ((int)(powerChange / 100)).ToString() + "  混乱";
                }
                else
                {
                    str = ((int)(powerChange / 100)).ToString();
                }

                color = Color.yellow;
            }

            if (i == 0)
            {
                hero.ShowHud(str, color, _del);
            }
            else
            {
                hero.ShowHud(str, color, null);
            }
        }
    }
Ejemplo n.º 2
0
    private void DoHpChange(BattleHpChangeVO _vo, Action _del)
    {
        for (int i = 0; i < _vo.pos.Count; i++)
        {
            int pos = _vo.pos[i];

            int hpChange = _vo.hpChange[i];

            HeroBattle hero = heroDic[pos];

            hero.RefreshHp();

            string str;

            Color color;

            if (hpChange > 0)
            {
                str = "+" + hpChange.ToString();

                color = Color.green;
            }
            else
            {
                str = hpChange.ToString();

                color = Color.red;
            }

            if (i == 0)
            {
                hero.ShowHud(str, color, _del);
            }
            else
            {
                hero.ShowHud(str, color, null);
            }
        }
    }