コード例 #1
0
        private void Awake()
        {
            // Default the input lock to unlocked
            _inputLockStatus = InputLockStatus.Unlocked;

            if (instance == null)
            {
                instance = this;
            }
            else if (instance != null)
            {
                Debug.Log("Found an existing instance of the InputManager, destroying this one");
                DestroyImmediate(this);
            }

            switch (_inputType)
            {
            case GameplayInputType.PC:
            {
                gameInput = new PCInput();
                break;
            }

            case GameplayInputType.Mobile:
            {
                Debug.LogError("Selected input type is not supported!");
                break;
            }
            }
        }
コード例 #2
0
 public void UnlockInput()
 {
     _inputLockStatus = InputLockStatus.Unlocked;
 }
コード例 #3
0
 public void LockInput()
 {
     _inputLockStatus = InputLockStatus.Locked;
 }