Пример #1
0
    /// <summary>
    /// 坐骑属性战斗力
    /// </summary>
    private double getMountsAttrCombat(Mounts mounts, int Type)
    {
        CardBaseAttribute attr = mounts.getMountsAddEffect();

        switch (Type)
        {
        case COE_HP:
            double hp    = attr.getWholeHp();
            double coehp = getCombatSampleBySid(MOUNTS_TYPE).hpCoe;
            return((int)(hp * coehp));

        case COE_ATT:
            double att    = attr.getWholeAtt();
            double coeAtt = getCombatSampleBySid(MOUNTS_TYPE).attCoe;
            return((int)(att * coeAtt));

        case COE_DEF:
            double def    = attr.getWholeDEF();
            double coeDef = getCombatSampleBySid(MOUNTS_TYPE).defCoe;
            return((int)(def * coeDef));

        case COE_MAG:
            double mag    = attr.getWholeMAG();
            double coeMag = getCombatSampleBySid(MOUNTS_TYPE).magCoe;
            return((int)(mag * coeMag));

        case COE_AGI:
            double agi    = attr.getWholeAGI();
            double coeAgi = getCombatSampleBySid(MOUNTS_TYPE).agiCoe;
            return((int)(agi * coeAgi));

        default:
            return(0);
        }
    }
Пример #2
0
    /// <summary>
    /// 获取使用的坐骑属性
    /// </summary>
    public CardBaseAttribute getUseMountsAttribute()
    {
        Mounts mounts = MountsManagerment.Instance.getMountsInUse();

        if (mounts != null)
        {
            return(mounts.getMountsAddEffect());
        }
        return(new CardBaseAttribute());
    }
Пример #3
0
 /** 更新属性 */
 private void updateAttr()
 {
     if (mounts != null)
     {
         CardBaseAttribute attr = mounts.getMountsAddEffect();
         hp.text    = attr.hp.ToString();
         mag.text   = attr.magic.ToString();
         att.text   = attr.attack.ToString();
         dex.text   = attr.agile.ToString();
         def.text   = attr.defecse.ToString();
         speed.text = mounts.getSpeed() + "%";
     }
     else
     {
         hp.text    = "";
         mag.text   = "";
         att.text   = "";
         dex.text   = "";
         def.text   = "";
         speed.text = "";
     }
 }