ZK_Framework/Assets/Scripts/Hotfix/Game/GameEntry.cs

22 lines
617 B
C#
Raw Normal View History

2024-07-05 13:34:17 +08:00
using System;
2024-07-04 20:18:43 +08:00
using UnityEngine;
2024-07-05 13:34:17 +08:00
using YooAsset;
2024-07-04 20:18:43 +08:00
namespace Game
{
public class GameEntry
{
2024-07-05 13:34:17 +08:00
private static Game game;
2024-07-04 20:18:43 +08:00
2024-07-05 13:34:17 +08:00
public static void Init(GameObject go, EPlayMode playMode, int index, Action callback)
2024-07-04 20:18:43 +08:00
{
Debug.Log("GameEntry");
// this.game = new Game();
2024-07-05 13:34:17 +08:00
// var go = GameObject.Find("Global");
// var global = go.GetComponent<Global>();
// game = new Game(global.gameObject, global.playMode, GameInitType.None);
game = new Game(go, playMode, (GameInitType)index);
callback?.Invoke();
2024-07-04 20:18:43 +08:00
}
}
}