Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / activity / prop / buff / BuffProp0001.cs
@小李xl 小李xl on 9 Nov 2023 495 bytes 制作3个道具
  1.  
  2. using Godot;
  3.  
  4. /// <summary>
  5. /// 移速 buff, 移速 + 3
  6. /// </summary>
  7. [Tool]
  8. public partial class BuffProp0001 : BuffProp
  9. {
  10. public override void OnPickUpItem()
  11. {
  12. Master.RoleState.MoveSpeed += 30;
  13. Master.RoleState.Acceleration += 400;
  14. Master.RoleState.Friction += 300;
  15. }
  16.  
  17. public override void OnRemoveItem()
  18. {
  19. Master.RoleState.MoveSpeed -= 30;
  20. Master.RoleState.Acceleration -= 400;
  21. Master.RoleState.Friction -= 300;
  22. }
  23. }