Example #1
0
 public bool equipOut(Item equipment)//将某件物品的附加属性从玩家身上移除
 {
     if (equipment != null)
     {
         Player player = PlayerDataManager.instance.playerData;
         player.defbonus  -= equipment.def;
         player.intebonus -= equipment.inte;
         player.strbonus  -= equipment.str;
         player.agibonus  -= equipment.agi;
         player.endbonus  -= equipment.end;
         for (int i = 0; i < equipment.effectid.Count; i++)
         {
             BuffBase b = BuffMethods.GetBuff(equipment.effectid[i]);
             PlayerDataManager.instance.playerManager.Buffout(b);
         }
     }
     return(false);
 }
Example #2
0
 public bool equipIn(Item equipment)//将某件物品的附加属性增加至玩家
 {
     if (equipment != null)
     {
         Player player = PlayerDataManager.instance.playerData;
         player.defbonus  += equipment.def;
         player.intebonus += equipment.inte;
         player.strbonus  += equipment.str;
         player.agibonus  += equipment.agi;
         player.endbonus  += equipment.end;
         for (int i = 0; i < equipment.effectid.Count; i++)
         {
             BuffBase b = BuffMethods.GetBuff(equipment.effectid[i]);
             Debug.Log(b.describe);
             PlayerDataManager.instance.playerManager.BuffIn(b);
         }
     }
     return(true);
 }