Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / activity / prop / buff / BuffPropProp0001.cs
@小李xl 小李xl on 4 Jul 2023 519 bytes 优化相机
  1.  
  2. using Godot;
  3.  
  4. /// <summary>
  5. /// 移速 buff, 移速 + 3
  6. /// </summary>
  7. [Tool]
  8. public partial class BuffPropProp0001 : BuffProp
  9. {
  10. protected override void OnPickUp(Role master)
  11. {
  12. master.RoleState.MoveSpeed += 30;
  13. master.RoleState.Acceleration += 400;
  14. master.RoleState.Friction += 300;
  15. }
  16.  
  17. protected override void OnRemove(Role master)
  18. {
  19. master.RoleState.MoveSpeed -= 30;
  20. master.RoleState.Acceleration -= 400;
  21. master.RoleState.Friction -= 300;
  22. }
  23. }