public static void DebugTouchData( int finger_id, Vector3 pos, TouchPhase phase ) { var touch_data = touches.Find( _ => _.FingerId == finger_id ); if ( touch_data != null ) { TouchData new_touch = new TouchData( finger_id, pos ); touches.Add( new_touch ); } touch_data.Phase = phase; switch ( phase ) { case TouchPhase.Began: EventTouchBegan.Invoke( touch_data ); break; case TouchPhase.Moved: EventTouchMoved.Invoke( touch_data ); break; case TouchPhase.Stationary: EventTouchStationary.Invoke( touch_data ); break; case TouchPhase.Ended: case TouchPhase.Canceled: EventTouchEnd.Invoke( touch_data ); break; } }
public void OnTouchEnd( TouchData touch_data ) { EventTouchEnd.Invoke( touch_data ); }
public void OnTouchStationary( TouchData touch_data ) { EventTouchStationary.Invoke( touch_data ); }
public void OnTouchBegan( TouchData touch_data ) { EventTouchBegan.Invoke( touch_data ); }