From 466fe42c5c02ae8139416ed4eafe728ef3347a40 Mon Sep 17 00:00:00 2001 From: Sagittaeri Date: Sat, 21 Jan 2017 18:41:51 +1100 Subject: [PATCH] added anim curve --- IronToad_UnityProject/Assets/Lighthouse.cs | 3 ++- .../Assets/_Scenes/LighthouseTestScene.unity | Bin 41984 -> 42456 bytes 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/IronToad_UnityProject/Assets/Lighthouse.cs b/IronToad_UnityProject/Assets/Lighthouse.cs index 0cf9bb4..b7b2347 100644 --- a/IronToad_UnityProject/Assets/Lighthouse.cs +++ b/IronToad_UnityProject/Assets/Lighthouse.cs @@ -12,6 +12,7 @@ public class Lighthouse : MonoBehaviour public float speed = 200f; public float timePadding = 0.5f; public float timeBetweenPoints = 3f; + public AnimationCurve animationCurve; private BGCcCursor splineCursor; private int targetPoint = 0; @@ -63,7 +64,7 @@ public class Lighthouse : MonoBehaviour float distance = Mathf.Abs(end - start); LeanTween.value(gameObject, start, end, distance / speed + timePadding).setOnUpdate((float val)=>{ splineCursor.Distance = val; - }).setEaseInOutQuad().setOnComplete(moveToNextPoint); + }).setEase(animationCurve).setOnComplete(moveToNextPoint); }); } } diff --git a/IronToad_UnityProject/Assets/_Scenes/LighthouseTestScene.unity b/IronToad_UnityProject/Assets/_Scenes/LighthouseTestScene.unity index 96693f89d0aa1bee500db09da4460130609d2bcf..adf24ccddc85652167dd8d5f476f665970e57ead 100644 GIT binary patch delta 526 zcmZoT!F1y^lK=xl`(*}(r8gKD7zBar4;uxR6^pS>+P%hBM)04YM3?#5S8IRh17%+@ zY$fs3;++yjb91NE=~#Z;lGBDIPOa=;oG^nFW zG|YgCYoLkGgNkdSi7$hSYaxk)9JC%Pt_>Gw0y}g!SlpO_K?hCZBvgYgnm8z2K@QcM zoF%D0S*<*nGchkSH?br$KX3B>xRlM62 hazPvWWTtMR$pZ5^Ca2El2l53ce^|`1nP<@#MgUh1Y;gbp delta 184 zcmca{nyKLglK=xln?3`>5(Xd;1hNA*3M?xYbMlT2asTbTMEJRbZ@9=*DJ7t6HN$2{ zJujxoVr4HT7fNbOj;jdXELUm7z1hFzCZlBnP=zoM&v&_10HhdZNHZ|B0%=wtUH}zS zkYQk$0_2MT@j|HBj>(B_!lE3q3=AefQ86H143%-%+}W1PI9Z^BW%IZ8Nz#)UJ7hNB IS^S3)0KNt>ZU6uP