コード例 #1
0
        public static void Init(LootLockerServerManager serverManager)
        {
            I = new LootLockerGameServerAPI();

            LootLockerBaseServerAPI.Init(I);

            I.ServerManager = serverManager;

            I.StartCoroutine = I.ServerManager.StartCoroutine;
        }
コード例 #2
0
        public static void CheckInit()
        {
            if (i == null)
            {
                var existingObj = GameObject.FindObjectOfType <LootLockerServerManager>();

                if (existingObj != null)
                {
                    i = existingObj;
                }
                else
                {
                    i = new GameObject("ServerManager").AddComponent <LootLockerServerManager>();
                }

                LootLockerGameServerAPI.Init(i);


                if (Application.isPlaying)
                {
                    DontDestroyOnLoad(i.gameObject);
                }
            }
        }