Esempio n. 1
0
    /// <summary>
    /// 增加最大血量
    /// </summary>
    public virtual void AddMaxHp(int num)
    {
        maxHp += num;

        hp += num;

        Actions.Add(MaxHpChangeAction.GetAction(this.ID, num));
    }
Esempio n. 2
0
    /// <summary>
    /// 减少最大血量
    /// </summary>
    public virtual void DeductMaxHp(int num)
    {
        maxHp -= num;
        if (hp > maxHp)
        {
            hp = maxHp;
        }

        Actions.Add(MaxHpChangeAction.GetAction(this.ID, -num));
    }