Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / buff / condition / Cond_HpFull.cs
@小李xl 小李xl on 17 Mar 2024 483 bytes 重构主动道具中
  1.  
  2. [ConditionFragment("HpFull",
  3. "判断满血状态, " +
  4. "参数1可选值: 0:判断非满血, 1:判断满血")]
  5. public class Cond_HpFull : ConditionFragment
  6. {
  7. private int _type;
  8. public override void InitParam(float arg1)
  9. {
  10. _type = (int)arg1;
  11. }
  12.  
  13. public override bool OnCheckUse()
  14. {
  15. if (_type == 0)
  16. {
  17. return !Role.IsHpFull();
  18. }
  19. else
  20. {
  21. return Role.IsHpFull();
  22. }
  23. }
  24. }