Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / activity / prop / buff / BuffProp0013.cs
  1. using Godot;
  2.  
  3. /// <summary>
  4. /// 武器背包 武器容量+1
  5. /// </summary>
  6. [Tool]
  7. public partial class BuffProp0013 : BuffProp
  8. {
  9. public override void OnPickUpItem()
  10. {
  11. if (Master is AdvancedRole advancedRole)
  12. {
  13. advancedRole.WeaponPack.SetCapacity(advancedRole.WeaponPack.Capacity + 1);
  14. }
  15. }
  16.  
  17. public override void OnRemoveItem()
  18. {
  19. if (Master is AdvancedRole advancedRole)
  20. {
  21. advancedRole.WeaponPack.SetCapacity(advancedRole.WeaponPack.Capacity - 1);
  22. }
  23. }
  24. }