using ChillConnect;
using SGModule.Common;
using SGModule.MarkdownKit;
using SGModule.Net;
using SGModule.NetKit;
using UnityEngine;


public class ChillConnectRoot : MonoBehaviour
{
    public void Awake()
    {
#if UNITY_EDITOR || GAME_RELEASE
        GameObject ingameDebugConsole = GameObject.Find("IngameDebugConsole");
        if (ingameDebugConsole != null) ingameDebugConsole.SetActive(false);
#endif
        // GameObject.Find("IngameDebugConsole").SetActive(false);//zhushi

        // NetworkKit.Instance.InitData(ConfigManager.GameConfig.packageName, ConfigManager.GameConfig.isRelease);

        MaxADKit.Init();

        OnLauncher();

        TrackKit.TrackLoginFunnel(LoginFunnelEventType.Bootstrap);
    }

    public static void OnLauncher()
    {
        AppObjConst.FrameGo = new GameObject($"{AppObjConst.FrameGoName}");
        AppObjConst.FrameGo.AddComponent<ChillConnectCore>();
        DontDestroyOnLoad(AppObjConst.FrameGo);
        App.InitApplication(SuperApplication.Instance);

        MarkdownKit.Instance.LoadText("privacy", "https://www.ballcrushbest.fun/privacy.md");
        MarkdownKit.Instance.LoadText("user", "https://www.ballcrushbest.fun/user.md");
    }
}
