Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / buff / condition / Cond_HpFull.cs
@小李xl 小李xl on 22 Mar 2024 506 bytes 道具逻辑片段更新参数描述

using System.Text.Json;

[ConditionFragment(
    "HpFull", 
    "判断满血状态, ",
    Arg1 = "(boolean)判断非满血"
)]
public class Cond_HpFull : ConditionFragment
{
    private bool _type;
    
    public override void InitParam(JsonElement[] arg)
    {
        _type = arg[0].GetBoolean();
    }

    public override bool OnCheckUse()
    {
        if (_type)
        {
            return !Role.IsHpFull();
        }
        else
        {
            return Role.IsHpFull();
        }
    }
}