Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / activity / prop / active / ActiveProp5000.cs
@小李xl 小李xl on 13 Mar 2024 483 bytes 重构buff中

using Godot;

/// <summary>
/// 医药箱, 使用后恢复一颗红心
/// </summary>
[Tool]
public partial class ActiveProp5000 : ActivePropActivity
{
    public override void OnInit()
    {
        base.OnInit();
        AutoDestroy = true;
        MaxCount = 10;
        Superposition = true;
    }

    public override bool OnCheckUse()
    {
        return !Master.IsHpFull();
    }

    protected override int OnUse()
    {
        Master.Hp += 2;
        return 1;
    }
}