using System.Collections; using System.Collections.Generic; using UnityEngine; using HedgehogTeam.EasyTouch; using System.Collections;
public class UIScale : MonoBehaviour {
private TextMesh textMesh; //限制缩小的最小值 public float min; //限制放大的最大值 public float max;
// Subscribe to events
void OnEnable()
{
EasyTouch.On_TouchStart2Fingers += On_TouchStart2Fingers;
EasyTouch.On_PinchIn += On_PinchIn;
EasyTouch.On_PinchOut += On_PinchOut;
EasyTouch.On_PinchEnd += On_PinchEnd;
}
void OnDisable()
{
UnsubscribeEvent();
}
void OnDestroy()
{
UnsubscribeEvent();
}
// Unsubscribe to events
void UnsubscribeEvent()
{
EasyTouch.On_TouchStart2Fingers -= On_TouchStart2Fingers;
EasyTouch.On_PinchIn -= On_PinchIn;
EasyTouch.On_PinchOut -= On_PinchOut;
EasyTouch.On_PinchEnd -= On_PinchEnd;
}
// 在两指接触开始
private void On_TouchSt
|