示例#1
0
        internal static InputFieldListener InitializeListener()
        {
            if (ListenerInstance == null)
            {
                ListenerInstance = UnityEngine.Object.FindObjectOfType(typeof(InputFieldListener)) as InputFieldListener;

                if (ListenerInstance == null)
                {
                    GameObject inputFieldListener = new GameObject("InputFieldListener");
                    ListenerInstance = inputFieldListener.AddComponent <InputFieldListener>();
                }
            }

            return(ListenerInstance);
        }
示例#2
0
 private static void OnSceneLoaded(Scene scene, LoadSceneMode mode)
 {
     if (scene.name == "StartScreen")
     {
         //enabling game console
         GameHelper.EnableConsole();
         //init config
         SEConfig.InitConfig();
         //add console commad for configuration window
         sEConfig = new SECommand();
         //add an action if changed controls
         GameInput.OnBindingsChanged += GameInput_OnBindingsChanged;
     }
     if (scene.name == "Main")
     {
         //creating a console input field listener to skip SlotExdender Update method key events conflict
         ListenerInstance = InitializeListener();
     }
 }
示例#3
0
        private static void OnSceneLoaded(Scene scene, LoadSceneMode mode)
        {
            if (scene.name == "StartScreen")
            {
                // enabling game console
                DevConsole.disableConsole = false;

                // init config
                SEConfig.Config_Init();

                // add an action if changed keybindings
                GameInput.OnBindingsChanged += GameInput_OnBindingsChanged;

                SlotHelper.InitSessionAllSlots();
            }
            if (scene.name == "Main")
            {
                // creating a console input field listener to skip SlotExdender Update method key events conflict while console is active in game
                ListenerInstance = InitializeListener();
            }
        }