Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / activity / prop / buff / BuffPropProp0001.cs
@lijincheng lijincheng on 8 Jul 2023 499 bytes 调整道具架构
  1.  
  2. using Godot;
  3.  
  4. /// <summary>
  5. /// 移速 buff, 移速 + 3
  6. /// </summary>
  7. [Tool]
  8. public partial class BuffPropProp0001 : 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. }