void LongPress()
    {
        string name = "";

        string[] msg = new string[0];
        switch (type)
        {
        case 1:
            name = "结束";
            msg  = new string[] { "结束行动,行动点会积累到下回合" };
            break;

        case 2:
            name = "攻击";
            msg  = new string[] { "普通攻击" };
            break;

        case 3:
            name = model.name;
            string msg1 = model.GetEffect(Manage.Instance.Battle.CurrentUnit.DataModel.finalAttribute);
            string msg2 = "消耗:" + model.GetAP(Manage.Instance.Battle.CurrentUnit.DataModel.finalAttribute);
            msg = new string[] { msg1, msg2 };
            break;
        }
        PanelManager.Instantiate.GetPanel <DownItemStatsPanel>().Open(name, msg);
    }
Exemple #2
0
    public override void OnUpdate()
    {
        base.OnUpdate();
        if (!gameObject.activeSelf)
        {
            return;
        }

        SetName(_attribute.name, _attribute.GetEffect(Character.finalAttribute), _attribute.GetDescribe);
        if (_attribute.triggerType == 1)
        {
            SetGame(APParent, _attribute.GetAPText(Character.finalAttribute));
            OnUpdateAttribute(_attribute.NeedAttribute, APParent);
            SetGame(NeedAttributeParent, _attribute.GetCDText(Character.finalAttribute));
            if (_attribute.releaseRange > 1)
            {
                SetGame(NeedAttributeParent, "施法范围:", _attribute.releaseRange);
            }
            if (_attribute.targetRange > 1)
            {
                SetGame(NeedAttributeParent, "有效范围:", _attribute.targetRange);
            }
            if (_attribute.needEquipment.Length > 0)
            {
                string s = "需要";
                switch (_attribute.needEquipment[0])
                {
                case 1:
                    s += (_attribute.needEquipment[1] == 1 ? "近战" : "远程") + "武器";
                    break;

                case 2:
                    s += DataName.GetName(((EquipmentEnum)_attribute.needEquipment[1]).ToString(), true);
                    break;

                case 3:
                    s += DataName.GetName(((weaponEnum)_attribute.needEquipment[1]).ToString(), true);
                    break;
                }
                SetGame(NeedAttributeParent, s);
            }
        }
        else
        {
            SetGame(AttributeParent, "被动技能");
        }

        //技能是否已经学习,没有就需要显示学习条件
        bool have = Character.dataModel.HaveSkill(Attribute);

        StudyNeedParent.gameObject.SetActive(!have);
        if (!have)
        {
            OnUpdateAttribute(_attribute.StudyNeedAttribute, StudyNeedParent);
            SetGame(StudyNeedParent, "等级:", _attribute.needLevel);
        }
    }