Unity_Learn/Assets/Scripts/Scenes/GameScene.cs
2025-09-10 13:51:16 +09:00

43 lines
969 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameScene : BaseScene
{
private Coroutine co;
protected override void Init()
{
base.Init();
_sceneType = Define.Scene.Game;
Managers.UI.ShowSceneUI<UI_Inven>("UI_Inven");
co = StartCoroutine("ExplodeAfterSeconds", 4.0f);
StartCoroutine("CoStopExplode",2.0f);
}
IEnumerator CoStopExplode(float seconds)
{
Debug.Log("CoStopExplode");
yield return new WaitForSeconds(seconds);
if (co != null)
{
StopCoroutine(co);
co = null;
Debug.Log("StopCoroutine");
}
}
IEnumerator ExplodeAfterSeconds(float seconds)
{
yield return new WaitForSeconds(seconds);
Debug.Log("BOOM!");
}
public override void Clear()
{
throw new System.NotImplementedException();
}
}