|
@ -12,6 +12,7 @@ public class Lighthouse : MonoBehaviour |
|
|
public float speed = 200f; |
|
|
public float speed = 200f; |
|
|
public float timePadding = 0.5f; |
|
|
public float timePadding = 0.5f; |
|
|
public float timeBetweenPoints = 3f; |
|
|
public float timeBetweenPoints = 3f; |
|
|
|
|
|
public AnimationCurve animationCurve; |
|
|
|
|
|
|
|
|
private BGCcCursor splineCursor; |
|
|
private BGCcCursor splineCursor; |
|
|
private int targetPoint = 0; |
|
|
private int targetPoint = 0; |
|
@ -63,7 +64,7 @@ public class Lighthouse : MonoBehaviour |
|
|
float distance = Mathf.Abs(end - start); |
|
|
float distance = Mathf.Abs(end - start); |
|
|
LeanTween.value(gameObject, start, end, distance / speed + timePadding).setOnUpdate((float val)=>{ |
|
|
LeanTween.value(gameObject, start, end, distance / speed + timePadding).setOnUpdate((float val)=>{ |
|
|
splineCursor.Distance = val; |
|
|
splineCursor.Distance = val; |
|
|
}).setEaseInOutQuad().setOnComplete(moveToNextPoint); |
|
|
|
|
|
|
|
|
}).setEase(animationCurve).setOnComplete(moveToNextPoint); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |