DisableDistroy.cs 870 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using System;
  2. using UnityEngine;
  3. public class DisableDistroy : BaseBehaviour
  4. {
  5. private void Start()
  6. {
  7. }
  8. private void Awake()
  9. {
  10. this.anim = base.GetComponent<Animator>();
  11. }
  12. private void OnDisable()
  13. {
  14. if (SingletonMono<WorldTime>.Instance != null)
  15. {
  16. }
  17. UnityEngine.Object.Destroy(base.gameObject);
  18. }
  19. private void OmDestroy()
  20. {
  21. }
  22. private void Update()
  23. {
  24. }
  25. private void OnEnable()
  26. {
  27. if (SingletonMono<WorldTime>.Instance != null)
  28. {
  29. }
  30. }
  31. private void ClipFrozen(object obj, EventArgs e)
  32. {
  33. if (this.isPause)
  34. {
  35. return;
  36. }
  37. this.isPause = true;
  38. this.anim.speed = 0f;
  39. }
  40. private void ClipResume(object obj, EventArgs e)
  41. {
  42. if (!this.isPause)
  43. {
  44. return;
  45. }
  46. this.anim.speed = 1f;
  47. this.isPause = false;
  48. }
  49. public bool isPause;
  50. private Animator anim;
  51. }