Esempio n. 1
0
        // ================================
        // Game Completion
        // ================================

        /// <summary>
        /// Called to disable input control in the event of game events or game completion
        /// </summary>
        public void RemoveInputSystems()
        {
            Debug.LogWarning("Lockout Triggered");
            DesktopInputManager desktopinput = this.GetComponent <DesktopInputManager>();

            Destroy(desktopinput);

            MobileInputManager mobileInput = this.GetComponent <MobileInputManager>();

            Destroy(mobileInput);
        }
Esempio n. 2
0
        /// <summary>
        /// Initiates the mobile input systerm to this player
        /// </summary>
        private void BeginMobileInputSystem()
        {
            //Spawn UI HUD
            UISettings uiSettings = GameManager.Instance.uiSettings;
            GameObject mobileHUD  = Instantiate(uiSettings.mobileUIHUDPrefab, Vector3.zero, Quaternion.identity) as GameObject;

            playerInput.SwitchCurrentActionMap("Mobile");
            DesktopInputManager desktopinput = this.GetComponent <DesktopInputManager>();

            desktopinput.enabled = false;

            IMobileInput mobileInput = this.GetComponent <IMobileInput>();

            mobileInput.InitialiseInput(mobileHUD);
        }