Unity_Learn/Assets/Scripts/Scenes/GameScene.cs
2025-09-10 12:54:42 +09:00

43 lines
933 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameScene : BaseScene
{
class Test
{
public int id = 0;
}
class CoroutineTest: IEnumerable
{
public IEnumerator GetEnumerator()
{
yield return new Test() {id = 1};
yield return new Test() {id = 2};
yield return new Test() {id = 3};
yield return new Test() {id = 4};
}
}
protected override void Init()
{
base.Init();
_sceneType = Define.Scene.Game;
Managers.UI.ShowSceneUI<UI_Inven>("UI_Inven");
CoroutineTest coroutineTest = new CoroutineTest();
foreach (Test t in coroutineTest)
{
Debug.Log(t.id);
}
}
public override void Clear()
{
throw new System.NotImplementedException();
}
}