43 lines
969 B
C#
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();
|
|
}
|
|
}
|