예제 #1
0
        public void Start()
        {
#if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_STANDALONE
            _inputController = new KeyboardController();
#endif
#if UNITY_ANDROID && !UNITY_EDITOR
            _inputController = new TouchController();
        #endif
            _inputController.TapEvent            += TapEvent;
            _inputController.SwipeUpEvent        += SwipeUpEvent;
            _inputController.SwipeDownEvent      += SwipeDownEvent;
            _inputController.SwipeLeftEvent      += SwipeLeftEvent;
            _inputController.SwipeRightEvent     += SwipeRightEvent;
            _inputController.SwipeUpOverEvent    += SwipeUpOverEvent;
            _inputController.SwipeDownOverEvent  += SwipeDownOverEvent;
            _inputController.SwipeLeftOverEvent  += SwipeLeftOverEvent;
            _inputController.SwipeRightOverEvent += SwipeRightOverEvent;
        }
예제 #2
0
 /// <summary>
 /// Unregisters an object from Input update.
 /// </summary>
 public void Unregister(IInputUpdate _update) => inputUpdates.Remove(_update);
예제 #3
0
        // ------------------------------

        /// <summary>
        /// Registers an object on Input update.
        /// </summary>
        public void Register(IInputUpdate _update) => inputUpdates.Add(_update);