public void Prepare(Camera _camera) { InputManager.AddCamera(_camera); m_onDrag = OnDrag; m_onTouchUp = OnTouchUp; m_onTouchDown = OnTouchDown; mouseInputObserver.MouseMovedEvent += OnMouseMoved; mouseInputObserver.PrimaryMouseButtonDownEvent += OnPrimaryMouseDown; }
public mg_pt_InputManager(Camera p_camera, mg_pt_ToppingBar p_toppingBar) { IsActive = true; m_toppingBar = p_toppingBar; m_camera = p_camera; InputManager.AddCamera(m_camera); m_onTouchStart = OnTouchStart; m_onTouchMove = OnTouchMove; m_onTouchEnd = OnTouchEnd; InputManager.Subscribe(TouchEvent.ON_TOUCH_START, m_onTouchStart); InputManager.Subscribe(TouchEvent.ON_SWIPE, m_onTouchMove); InputManager.Subscribe(TouchEvent.ON_TOUCH_UP, m_onTouchEnd); }
public mg_if_InputManager(Camera p_camera, mg_if_GameLogic p_logic, MouseInputObserver mouseInputObserver) { m_logic = p_logic; m_camera = p_camera; InputManager.AddCamera(m_camera); m_fingerIndex = -1; InputManager.LongTapTime = 0.05f; m_onTouchStart = OnTouchStart; m_onTouchUp = OnTouchUp; m_onTouchDown = OnTouchDown; InputManager.Subscribe(TouchEvent.ON_TOUCH_START, m_onTouchStart); InputManager.Subscribe(TouchEvent.ON_TOUCH_UP, m_onTouchUp); InputManager.Subscribe(TouchEvent.ON_TOUCH_DOWN, m_onTouchDown); this.mouseInputObserver = mouseInputObserver; mouseInputObserver.MouseMovedEvent += OnMouseMoved; }
public mg_ss_InputManager(Camera p_camera, mg_ss_PlayerLogic p_player) { m_touches = new List <mg_ss_InputTouch>(); m_player = p_player; m_camera = p_camera; InputManager.AddCamera(m_camera); InputManager.LongTapTime = 0.05f; m_onTouchStart = OnTouchStart; m_onTouchDown = OnTouchDown; m_onTouchEnd = OnTouchEnd; m_onSwipeEnd = OnSwipeEnd; InputManager.Subscribe(TouchEvent.ON_TOUCH_START, m_onTouchStart); InputManager.Subscribe(TouchEvent.ON_TOUCH_DOWN, m_onTouchDown); InputManager.Subscribe(TouchEvent.ON_TOUCH_UP, m_onTouchEnd); InputManager.Subscribe(TouchEvent.ON_SWIPE_END, m_onSwipeEnd); MinigameManager.GetActive <mg_SmoothieSmash>().InputObserver.SteeringChangedEvent += OnInputObserverSteeringChanged; }
public static void Subscribe(TouchEvent touchEvent, DelegateInputManagerSubscribeEvent action) { switch (touchEvent) { case TouchEvent.ON_TOUCH_START: EasyTouch.On_TouchStart += action.Invoke; break; case TouchEvent.ON_TOUCH_DOWN: EasyTouch.On_TouchDown += action.Invoke; break; case TouchEvent.ON_TOUCH_UP: EasyTouch.On_TouchUp += action.Invoke; break; case TouchEvent.ON_SWIPE_START: EasyTouch.On_SwipeStart += action.Invoke; break; case TouchEvent.ON_SWIPE: EasyTouch.On_Swipe += action.Invoke; break; case TouchEvent.ON_SWIPE_END: EasyTouch.On_SwipeEnd += action.Invoke; break; case TouchEvent.ON_DRAG_START: EasyTouch.On_DragStart += action.Invoke; break; case TouchEvent.ON_DRAG: EasyTouch.On_Drag += action.Invoke; break; case TouchEvent.ON_DRAG_END: EasyTouch.On_DragEnd += action.Invoke; break; case TouchEvent.ON_CANCEL: EasyTouch.On_Cancel += action.Invoke; break; case TouchEvent.ON_PINCH_IN: EasyTouch.On_PinchIn += action.Invoke; break; case TouchEvent.ON_PINCH_OUT: EasyTouch.On_PinchOut += action.Invoke; break; case TouchEvent.ON_PINCH_END: EasyTouch.On_PinchEnd += action.Invoke; break; case TouchEvent.ON_TWIST: EasyTouch.On_Twist += action.Invoke; break; case TouchEvent.ON_TWIST_END: EasyTouch.On_TwistEnd += action.Invoke; break; case TouchEvent.ON_SIMPLE_TAP: EasyTouch.On_SimpleTap += action.Invoke; break; } }