mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-16 08:25:20 +01:00
41 lines
780 B
C#
41 lines
780 B
C#
using UnityEngine;
|
|
|
|
namespace MoleMole
|
|
{
|
|
public class IslandCameraDampingState : IslandCameraBaseState
|
|
{
|
|
public IslandCameraDampingState(MonoIslandCameraSM sm)
|
|
{
|
|
_sm = sm;
|
|
}
|
|
|
|
public override void Update()
|
|
{
|
|
_sm.ToDampingSpeed();
|
|
if (Miscs.IsAlmostZero(_sm.SwipeMoveHandler().magnitude))
|
|
{
|
|
_sm.SetSwipeSpeed(Vector2.zero);
|
|
_sm.GotoState(E_IslandCameraState.Swipe);
|
|
}
|
|
}
|
|
|
|
public override void Enter(IslandCameraBaseState lastState, object param = null)
|
|
{
|
|
base.Enter(lastState, param);
|
|
}
|
|
|
|
public override void Exit(IslandCameraBaseState nextState)
|
|
{
|
|
}
|
|
|
|
public override void OnTouchStart(Gesture gesture)
|
|
{
|
|
_sm.GotoState(E_IslandCameraState.Swipe, gesture);
|
|
}
|
|
|
|
public override void OnTouchUp(Gesture gesture)
|
|
{
|
|
}
|
|
}
|
|
}
|