DahalStoryAnimControlTools.cs 1013 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using System;
  2. using UnityEngine;
  3. namespace SceneStory
  4. {
  5. public class DahalStoryAnimControlTools : BaseBehaviour
  6. {
  7. private void OnEnable()
  8. {
  9. GameObject boss = R.Enemy.Boss;
  10. if (boss == null)
  11. {
  12. return;
  13. }
  14. this.dac = boss.GetComponent<DahalAction>();
  15. this.smc = boss.GetComponent<StateMachine>();
  16. }
  17. public void DahalHasGravity(BoolEnum open)
  18. {
  19. if (open == BoolEnum.True)
  20. {
  21. this.dac.GetComponent<TimeController>().SetGravity(1f);
  22. }
  23. if (open == BoolEnum.False)
  24. {
  25. this.dac.GetComponent<TimeController>().SetGravity(0f);
  26. }
  27. }
  28. public void DahalTurnRound(int dir)
  29. {
  30. this.dac.ChangeFace(dir);
  31. }
  32. public void DahalChangeState(DahalAction.StateEnum nextState)
  33. {
  34. this.smc.SetState(nextState);
  35. }
  36. public void DahalStartMove()
  37. {
  38. this.dac.AutoMove();
  39. }
  40. public void DahalStopMove()
  41. {
  42. this.dac.StopMoveToIdle();
  43. }
  44. private DahalAction dac;
  45. private StateMachine smc;
  46. }
  47. }