PlayerSpHurt.cs 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. using System;
  2. using ExtensionMethods;
  3. using UnityEngine;
  4. public class PlayerSpHurt
  5. {
  6. private PlayerAction pac
  7. {
  8. get
  9. {
  10. return R.Player.Action;
  11. }
  12. }
  13. private PlayerAttribute pAttr
  14. {
  15. get
  16. {
  17. return R.Player.Attribute;
  18. }
  19. }
  20. public bool DaoRoll(Transform enemy)
  21. {
  22. return enemy.GetComponent<StateMachine>() != null && enemy.GetComponent<StateMachine>().currentState == "DaoAtk2";
  23. }
  24. public bool CanBeJumperCatach(Transform enemy)
  25. {
  26. bool flag = enemy.GetComponent<JumperAction>() != null && enemy.GetComponent<StateMachine>().currentState == "Atk3";
  27. bool flag2 = !this.pac.stateMachine.currentState.IsInArray(PlayerAction.SpHurtSta) && !this.pAttr.isDead;
  28. return flag && flag2;
  29. }
  30. public bool CanBeJumperFooterCatch(Transform enemy)
  31. {
  32. bool flag = enemy.GetComponent<JumperFooterAction>() != null && enemy.GetComponent<StateMachine>().currentState == "Atk2Ready";
  33. bool flag2 = !this.pac.stateMachine.currentState.IsInArray(PlayerAction.SpHurtSta) && !this.pAttr.isDead;
  34. return flag && flag2;
  35. }
  36. public bool CanBeBeelzebubEat(Transform enemy)
  37. {
  38. bool flag = enemy.GetComponent<BeelzebubAction>() != null && enemy.GetComponent<StateMachine>().currentState == "Atk1";
  39. bool flag2 = !this.pac.stateMachine.currentState.IsInArray(PlayerAction.SpHurtSta) && !this.pAttr.isDead;
  40. return flag && flag2;
  41. }
  42. public bool CanBeBeelzebubSaw(Transform enemy)
  43. {
  44. bool flag = enemy.GetComponent<BeelzebubAction>() != null && enemy.GetComponent<StateMachine>().currentState == "Atk2";
  45. bool flag2 = !this.pac.stateMachine.currentState.IsInArray(PlayerAction.SpHurtSta) && !this.pAttr.isDead;
  46. return flag && flag2;
  47. }
  48. public bool CanBombKillerCatch(Transform enemy)
  49. {
  50. bool flag = enemy.GetComponent<BombKillerAction>() != null && enemy.GetComponent<StateMachine>().currentState == "Atk1Ready";
  51. bool flag2 = !this.pac.stateMachine.currentState.IsInArray(PlayerAction.SpHurtSta) && !this.pAttr.isDead;
  52. return flag && flag2;
  53. }
  54. public bool CanEatingBossEat(Transform enemy)
  55. {
  56. bool flag = enemy.GetComponent<EatingBossAction>() != null && enemy.GetComponent<StateMachine>().currentState == "Atk2";
  57. bool flag2 = !this.pac.stateMachine.currentState.IsInArray(PlayerAction.SpHurtSta) && !this.pAttr.isDead;
  58. return flag && flag2;
  59. }
  60. public bool JumperCatachSuccess(Transform enemy, bool force)
  61. {
  62. return enemy.GetComponent<JumperAction>() != null && force;
  63. }
  64. public bool JumperFooterCatchSuccess(Transform enemy, bool force)
  65. {
  66. return enemy.GetComponent<JumperFooterAction>() != null && force;
  67. }
  68. public bool BeelzebubSpAttackSuccess(Transform enemy, bool force)
  69. {
  70. return enemy.GetComponent<BeelzebubAction>() != null && force;
  71. }
  72. public bool BombKillerAtkSuccess(Transform enemy, bool force)
  73. {
  74. return enemy.GetComponent<BombKillerAction>() != null && force;
  75. }
  76. public bool EatingBossEatSuccess(Transform enemy, bool force)
  77. {
  78. return enemy.GetComponent<EatingBossAction>() != null && force;
  79. }
  80. }