Esempio n. 1
0
 /// <summary>
 /// 减少玩家属性值(装备)
 /// </summary>
 /// <param name="info"></param>
 public void ReduceProperties(ObjectInfo info)
 {
     PlayerStatusInfo.Instance().attack -= info.attack;
     PlayerStatusInfo.Instance().def    -= info.def;
     PlayerStatusInfo.Instance().speed  -= info.speed;
     //更新一次玩家信息界面显示
     StatusBoard.Instance().UpdateStatusShow();
 }
Esempio n. 2
0
    /// <summary>
    /// 减少玩家属性值(技能)
    /// </summary>
    /// <param name="type">技能加持buff类型</param>
    /// <param name="num">buff数值</param>
    public void ReduceProperties(SkillInfo.SkillEffectType type, int num)
    {
        switch (type)
        {
        case SkillInfo.SkillEffectType.ATTACK: PlayerStatusInfo.Instance().attack -= num; break;

        case SkillInfo.SkillEffectType.DEF:    PlayerStatusInfo.Instance().def -= num;    break;

        case SkillInfo.SkillEffectType.SPEED:  PlayerStatusInfo.Instance().speed -= num;  break;
        }
        //更新一次玩家信息界面显示
        StatusBoard.Instance().UpdateStatusShow();
    }
Esempio n. 3
0
    /// <summary>
    /// 增加玩家属性值(加点)
    /// </summary>
    /// <param name="selectName">点击的加点按钮明名称</param>
    /// <param name="num">默认一次加10点</param>
    public void AddProperties(string selectName, int num = 10)
    {
        switch (selectName)
        {
        case "AtkButton": PlayerStatusInfo.Instance().attack += num; break;

        case "DefButton": PlayerStatusInfo.Instance().def += num; break;

        case "SpButton": PlayerStatusInfo.Instance().speed += num; break;
        }
        //更新一次玩家信息界面显示
        StatusBoard.Instance().UpdateStatusShow();
    }
Esempio n. 4
0
    /// <summary>
    /// 增加玩家属性值(技能)
    /// </summary>
    /// <param name="type">技能加持buff类型</param>
    /// <param name="num">buff数值</param>
    public void AddProperties(SkillInfo.SkillEffectType type, int num)
    {
        Debug.Log(type.ToString());
        switch (type)
        {
        case SkillInfo.SkillEffectType.ATTACK: PlayerStatusInfo.Instance().attack += num; break;

        case SkillInfo.SkillEffectType.DEF:    PlayerStatusInfo.Instance().def += num;    break;

        case SkillInfo.SkillEffectType.SPEED:  PlayerStatusInfo.Instance().speed += num;  break;
        }
        //更新一次玩家信息界面显示
        StatusBoard.Instance().UpdateStatusShow();
    }
Esempio n. 5
0
 public void ReducePoint(int num = 1)
 {
     PlayerStatusInfo.Instance().point -= num;
     //更新一次玩家信息界面显示
     StatusBoard.Instance().UpdateStatusShow();
 }
Esempio n. 6
0
 /// <summary>
 /// 增加升级点数
 /// </summary>
 /// <param name="num">增加数量(默认5)</param>
 public void AddPoint(int num = 5)
 {
     PlayerStatusInfo.Instance().point += num;
     //更新一次玩家信息界面显示
     StatusBoard.Instance().UpdateStatusShow();
 }