Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / buff / condition / Cond_HpFull.cs
@小李xl 小李xl on 17 Mar 2024 483 bytes 重构主动道具中

[ConditionFragment("HpFull", 
    "判断满血状态, " +
    "参数1可选值: 0:判断非满血, 1:判断满血")]
public class Cond_HpFull : ConditionFragment
{
    private int _type;
    
    public override void InitParam(float arg1)
    {
        _type = (int)arg1;
    }

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