Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / activity / prop / buff / BuffPropProp0001.cs
@lijincheng lijincheng on 8 Jul 2023 499 bytes 调整道具架构

using Godot;

/// <summary>
/// 移速 buff, 移速 + 3
/// </summary>
[Tool]
public partial class BuffPropProp0001 : BuffProp
{
    public override void OnPickUpItem()
    {
        Master.RoleState.MoveSpeed += 30;
        Master.RoleState.Acceleration += 400;
        Master.RoleState.Friction += 300;
    }

    public override void OnRemoveItem()
    {
        Master.RoleState.MoveSpeed -= 30;
        Master.RoleState.Acceleration -= 400;
        Master.RoleState.Friction -= 300;
    }
}