using System;
using System.Collections.Generic;
using System.Text;
using UnityEngine;
namespace Thousandto.Core.Base
{
///
/// 手指手势的操作 接口定义
///
public interface IFingerGesturesEvent
{
//按下
event FingerDownEventHandler OnFingerDown;
//弹起
event FingerUpEventHandler OnFingerUp;
//两个手指的捏操作
event PinchEventHandler OnPinchBegin;
event PinchMoveEventHandler OnPinchMove;
event PinchEventHandler OnPinchEnd;
//两个手指的旋转操作
event RotationBeginEventHandler OnRotationBegin;
event RotationMoveEventHandler OnRotationMove;
event RotationEndEventHandler OnRotationEnd;
//单个手指的滑动操作
event FingerMoveEventHandler OnFingerMoveBegin;
event FingerMoveEventHandler OnFingerMove;
event FingerMoveEventHandler OnFingerMoveEnd;
}
#region//定义委托
///
/// Delegate for the OnFingerDown event
///
/// 0-based index uniquely indentifying a specific finger
/// Current position of the finger on the screen
public delegate void FingerDownEventHandler(int fingerIndex, Vector2 fingerPos);
///
/// Delegate for the OnFingerUp event
///
/// 0-based index uniquely indentifying a specific finger
/// Current position of the finger on the screen
/// How long the finger has been held down before getting released, in seconds
public delegate void FingerUpEventHandler(int fingerIndex, Vector2 fingerPos, float timeHeldDown);
///
/// Delegate for the OnFingerMoveBegin, OnFingerMove, OnFingerMoveEnd events
///
/// 0-based index uniquely indentifying a specific finger
/// Current position of the finger on the screen
public delegate void FingerMoveEventHandler(int fingerIndex, Vector2 fingerPos);
///
/// Delegate for the OnPinchBegin and OnPinchEnd events
///
/// First finger screen position
/// Second finger screen position
public delegate void PinchEventHandler(Vector2 fingerPos1, Vector2 fingerPos2);
///
/// Delegate for the OnPinchMove event
///
/// First finger screen position
/// Second finger screen position
/// How much the distance between the two fingers has changed since the last update. A negative value means the two fingers got closer, while a positive value means they moved further apart
public delegate void PinchMoveEventHandler(Vector2 fingerPos1, Vector2 fingerPos2, float delta);
///
/// Delegate for the OnRotationBegin event
///
/// First finger screen position
/// Second finger screen position
public delegate void RotationBeginEventHandler(Vector2 fingerPos1, Vector2 fingerPos2);
///
/// Delegate for the OnRotationMove event
///
/// First finger screen position
/// Second finger screen position
/// Angle difference, in degrees, since the last update.
public delegate void RotationMoveEventHandler(Vector2 fingerPos1, Vector2 fingerPos2, float rotationAngleDelta);
///
/// Delegate for the OnRotationEnd event
///
/// First finger screen position
/// Second finger screen position
/// Total rotation performed during the gesture, in degrees
public delegate void RotationEndEventHandler(Vector2 fingerPos1, Vector2 fingerPos2, float totalRotationAngle);
#endregion
}