SupplyBoxAnimatorControlTools.cs 583 B

12345678910111213141516171819202122232425
  1. using System;
  2. using System.Collections;
  3. using UnityEngine;
  4. [RequireComponent(typeof(SupplyBoxAction))]
  5. public class SupplyBoxAnimatorControlTools : BaseBehaviour
  6. {
  7. private void Start()
  8. {
  9. this._supplyBox = base.GetComponent<SupplyBoxAction>();
  10. base.StartCoroutine(this.WaitForBreakCoroutine());
  11. }
  12. private IEnumerator WaitForBreakCoroutine()
  13. {
  14. yield return this._supplyBox.WaitForBreak();
  15. this._animator.SetBool("IsSupplyBoxBreak", true);
  16. yield break;
  17. }
  18. [SerializeField]
  19. private Animator _animator;
  20. private SupplyBoxAction _supplyBox;
  21. }