[Player] Add dispatcher for cancelled movement and reset pickup correctly when move cancelled during pickup
This commit is contained in:
@@ -19,6 +19,7 @@ public class PlayerTouchController : MonoBehaviour, ITouchInputConsumer
|
||||
|
||||
public delegate void ArrivedAtTargetHandler();
|
||||
public event ArrivedAtTargetHandler OnArrivedAtTarget;
|
||||
public event System.Action OnMoveToCancelled;
|
||||
private Coroutine moveToCoroutine;
|
||||
private bool interruptMoveTo = false;
|
||||
|
||||
@@ -112,6 +113,7 @@ public class PlayerTouchController : MonoBehaviour, ITouchInputConsumer
|
||||
public void InterruptMoveTo()
|
||||
{
|
||||
interruptMoveTo = true;
|
||||
OnMoveToCancelled?.Invoke();
|
||||
}
|
||||
|
||||
private System.Collections.IEnumerator MoveToTargetCoroutine(Vector3 target)
|
||||
|
||||
Reference in New Issue
Block a user