void Awake() { if (DisableLists.Value) { DisableCharaList.Patch(); } var gameobject = new GameObject(nameof(CardOrganizerKK)); gameobject.transform.SetParent(gameObject.transform); var dispatcher = gameobject.AddComponent <UnityMainThreadDispatcher>(); var scenes = new Dictionary <string, CardHandler> { { "Maker", gameobject.AddComponent <Methods_Maker>() }, { "Studio", gameobject.AddComponent <Methods_CharaStudio>() }, { "FreeH", gameobject.AddComponent <Methods_HScene>() }, { "FreeHSelect", gameobject.AddComponent <Methods_FreeHSelect>() } }; RPCClient_Plugin.Init("CardOrganizerServer", 9125, "KK", (message, id) => { if (!dispatcher) { Console.WriteLine("[CardOrganizer] Dispatcher dead"); } dispatcher.Enqueue(() => scenes[id].UseCard(message)); }); SceneLoaded(); SceneManager.sceneLoaded += SceneLoaded; }
public void Awake() { var gameobject = new GameObject(nameof(CardOrganizerHS)); gameobject.transform.SetParent(gameObject.transform); var dispatcher = gameobject.AddComponent <UnityMainThreadDispatcher>(); var scenes = new Dictionary <string, CardHandler> { { "StudioNeo", gameobject.AddComponent <Methods_StudioNeo>() }, { "Maker", gameobject.AddComponent <Methods_Maker>() }, { "HScene", gameobject.AddComponent <Methods_HScene>() }, //{ "MapSelect", gameobject.AddComponent<Methods_MapSelect>() }, }; RPCClient_Plugin.Init("CardOrganizerServer", 9125, "HS", (message, id) => { if (!dispatcher) { Console.WriteLine("[CardOrganizer] Dispatcher dead"); } dispatcher.Enqueue(() => scenes[id].UseCard(message)); }); }
public void Awake() { var gameobject = new GameObject(GetType().Name); gameobject.transform.SetParent(gameObject.transform); var dispatcher = gameobject.AddComponent <UnityMainThreadDispatcher>(); var scenes = new Dictionary <string, CardHandler> { { "HScene", gameobject.AddComponent <Methods_HScene>() }, { "Studio", gameobject.AddComponent <Methods_Studio>() } }; RPCClient_Plugin.Init("CardOrganizerServer", 9125, "PH", (message, id) => { if (!dispatcher) { Console.WriteLine("[CardOrganizer] Dispatcher dead"); } dispatcher.Enqueue(() => scenes[id].UseCard(message)); }); SceneLoaded(); SceneManager.sceneLoaded += SceneLoaded; }