Exemple #1
0
 public virtual void Awake()
 {
     for (int i = 0; i < _inputModes.Count; i++)
     {
         _inputModes[i].Awake(this);
     }
     _defaultMode = _inputModes[0];
     SetInputMode(0, null);
 }
Exemple #2
0
        void SetInputMode(int mode, object[] data)
        {
            if (_curMode != null)
            {
                _curMode.OnDisable();
            }

            Debug.Log("Setting input mode to " + _inputModes[mode]);
            _curMode = _inputModes[mode];      // note we can do enter/exit stuff if need be

            if (_curMode != null)
            {
                _curMode.SetParams(data);
                _curMode.OnEnable();
            }
        }