Merge pull request 'Update zoom camera' (#307) from feature/HP_jump into develop

Reviewed-on: https://git.pthub.vn/Unity/perfect-world-unity/pulls/307
This commit is contained in:
tungdv
2026-04-08 03:41:37 +00:00
@@ -26,6 +26,7 @@ namespace BrewMonster
private float _lastPinchDistance;
private bool _pinchZoomActive;
private int _touchCount = 0;
public CinemachineOrbitalFollow Orbital { get => orbital;}
@@ -63,11 +64,19 @@ namespace BrewMonster
public void OnPointerDown(PointerEventData eventData)
{
fingerDown = true;
if(_touchCount < 2)
{
_touchCount++;
}
}
public void OnPointerUp(PointerEventData eventData)
{
fingerDown = false;
if(_touchCount > 0)
{
_touchCount--;
}
}
private void OnValidate()
@@ -133,7 +142,7 @@ namespace BrewMonster
return;
}
if (Input.touchCount == 2)
if (_touchCount == 2)
{
Touch t0 = Input.GetTouch(0);
Touch t1 = Input.GetTouch(1);