Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / buff / condition / Cond_HpFull.cs
@小李xl 小李xl on 22 Mar 2024 506 bytes 道具逻辑片段更新参数描述
  1.  
  2. using System.Text.Json;
  3.  
  4. [ConditionFragment(
  5. "HpFull",
  6. "判断满血状态, ",
  7. Arg1 = "(boolean)判断非满血"
  8. )]
  9. public class Cond_HpFull : ConditionFragment
  10. {
  11. private bool _type;
  12. public override void InitParam(JsonElement[] arg)
  13. {
  14. _type = arg[0].GetBoolean();
  15. }
  16.  
  17. public override bool OnCheckUse()
  18. {
  19. if (_type)
  20. {
  21. return !Role.IsHpFull();
  22. }
  23. else
  24. {
  25. return Role.IsHpFull();
  26. }
  27. }
  28. }