BlackMaskController.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class BlackMaskController : MonoBehaviour
  5. {
  6. public GameObject m_FristObj;
  7. public GameObject m_SencondObj;
  8. public GameObject m_ThirdObj;
  9. public GameObject m_FourthObj;
  10. public GameObject m_FifthObj;
  11. public void BlackMaskControl()
  12. {
  13. StartCoroutine(BlackMask());
  14. }
  15. IEnumerator BlackMask()
  16. {
  17. m_FristObj.SetActive(true);
  18. yield return new WaitForSeconds(0.5f);
  19. m_FristObj.SetActive(false);
  20. m_SencondObj.SetActive(true);
  21. yield return new WaitForSeconds(0.5f);
  22. m_SencondObj.SetActive(false);
  23. m_ThirdObj.SetActive(true);
  24. yield return new WaitForSeconds(0.5f);
  25. m_ThirdObj.SetActive(false);
  26. m_FourthObj.SetActive(true);
  27. yield return new WaitForSeconds(0.5f);
  28. m_FourthObj.SetActive(false);
  29. m_FifthObj.SetActive(true);
  30. yield return new WaitForSeconds(0.5f);
  31. m_FifthObj.SetActive(false);
  32. }
  33. }