Ejemplo n.º 1
0
    public void ShowText(int damage, string damageType, string skillName)
    {
        int     index = _list.ItemIndexToChildIndex(TurnControl.instance._index);
        GObject obj   = _list.GetChildAt((index + 11) % 50);

        if (damageType != "True1")
        {
            if (damage == -1)
            {
                string str = EnemyStatus.instance.BaseStatus.EnemyName + "使用了" + skillName + ",但是被你闪避了!";
                _list.AddSelection(TurnControl.instance._index, true);
                MailItem item = (MailItem)obj;
                item.setText(str);
            }
            else if (damage == -2)
            {
                string str = EnemyStatus.instance.BaseStatus.EnemyName + "把你打败了";
                _list.AddSelection(TurnControl.instance._index, true);
                MailItem item = (MailItem)obj;
                item.setText(str);
            }
            else if (damage == -3)
            {
                string str = "休息并寻找下一个敌人中。。。";
                _list.AddSelection(TurnControl.instance._index, true);
                MailItem item = (MailItem)obj;
                item.setText(str);
            }
            else if (damage == -4)
            {
                string str = "发现" + EnemyStatus.instance.BaseStatus.EnemyName;
                _list.AddSelection(TurnControl.instance._index, true);
                MailItem item = (MailItem)obj;
                item.setText(str);
            }
            else
            {
                string str = EnemyStatus.instance.BaseStatus.EnemyName + "使用了" + skillName + ",对你造成了" + damage + "点" + damageType + "伤害";
                _list.AddSelection(TurnControl.instance._index, true);
                MailItem item = (MailItem)obj;
                item.setText(str);
            }
        }
        else
        {
            string str = HeroStatus.instance.BaseStatus.HeroName + "使用了" + skillName + ",回复了" + damage + "点生命";
            _list.AddSelection(TurnControl.instance._index, true);
            MailItem item = (MailItem)obj;
            item.setText(str);
        }
        TurnControl.instance._index = (TurnControl.instance._index + 1) % 50;
    }