Esempio n. 1
0
    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);
    }
Esempio n. 2
0
    protected override void OnAtk()
    {
        owner.CurrentUnit.UserApp(model.GetAP(owner.CurrentUnit.DataModel.finalAttribute));
        GameObject prefab = Manage.Instance.Resources.GetObj(ResourcesEnum.SkillPrefab, model.model);

        ObjectPooling.Instance.GetObject <BaseSkillObject>(prefab, null).Enter(owner.CurrentUnit, model, TargetCell, ChangeState);
    }
Esempio n. 3
0
    public void UpdateSkill(SkillAttribute skill, Unit unit)
    {
        type        = 3;
        model       = skill;
        icon.sprite = Manage.Instance.AB.GetGame <Sprite>(AssetbundleEnum.SkillIcon, skill.icon);
        int needAp = skill.GetAP(unit.DataModel.finalAttribute);

        Interactable(unit.CurrentAP >= needAp);
        number.color = unit.CurrentAP >= needAp ? Color.white : Color.red;
        number.text  = needAp.ToString();

        if (skill.IsNeedEquipment(unit.DataModel.dataModel) == false)
        {
            mask.SetActive(true);
            return;
        }
        Open();
    }