diff --git a/IronToad_UnityProject/Assets/Animations.meta b/IronToad_UnityProject/Assets/Animations.meta deleted file mode 100644 index b2e446b..0000000 --- a/IronToad_UnityProject/Assets/Animations.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 653e5549e4b277c4facae79f936bb3e6 -folderAsset: yes -timeCreated: 1484972317 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/IronToad_UnityProject/Assets/BansheeGz/BGCurve/Examples/Materials/BGTestLineRendererCheckerBox.mat b/IronToad_UnityProject/Assets/BansheeGz/BGCurve/Examples/Materials/BGTestLineRendererCheckerBox.mat index 7eb7c60..3417e9c 100644 Binary files a/IronToad_UnityProject/Assets/BansheeGz/BGCurve/Examples/Materials/BGTestLineRendererCheckerBox.mat and b/IronToad_UnityProject/Assets/BansheeGz/BGCurve/Examples/Materials/BGTestLineRendererCheckerBox.mat differ diff --git a/IronToad_UnityProject/Assets/Lighthouse.cs b/IronToad_UnityProject/Assets/Lighthouse.cs deleted file mode 100644 index b7b2347..0000000 --- a/IronToad_UnityProject/Assets/Lighthouse.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -using BansheeGz.BGSpline.Components; -using BansheeGz.BGSpline.Curve; - -public class Lighthouse : MonoBehaviour -{ - public BGCurve splineCurve; - public List splineDistantPoints = new List(); - public float speed = 200f; - public float timePadding = 0.5f; - public float timeBetweenPoints = 3f; - public AnimationCurve animationCurve; - - private BGCcCursor splineCursor; - private int targetPoint = 0; - private bool reverseDirection = false; - - void Start() - { - splineCursor = splineCurve.GetComponent(); - - if (splineDistantPoints == null || splineDistantPoints.Count == 0) - { - splineDistantPoints.Add(0f); - for (int i=1; i{ - if (reverseDirection) - targetPoint--; - else - targetPoint++; - if (targetPoint >= splineDistantPoints.Count) - { - if (splineCurve.Closed) - { - targetPoint = 1; - splineCursor.Distance = 0f; - } - else - { - targetPoint = splineDistantPoints.Count - 2; - reverseDirection = !reverseDirection; - } - } - - float start = splineCursor.Distance; - float end = splineDistantPoints[targetPoint]; - float distance = Mathf.Abs(end - start); - LeanTween.value(gameObject, start, end, distance / speed + timePadding).setOnUpdate((float val)=>{ - splineCursor.Distance = val; - }).setEase(animationCurve).setOnComplete(moveToNextPoint); - }); - } -} diff --git a/IronToad_UnityProject/Assets/Lighthouse.cs.meta b/IronToad_UnityProject/Assets/Lighthouse.cs.meta deleted file mode 100644 index c35ad1b..0000000 --- a/IronToad_UnityProject/Assets/Lighthouse.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: e529d146693e04d5983a4fbbb25de5ab -timeCreated: 1484975905 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/IronToad_UnityProject/Assets/Scripts/HeavyObject.cs b/IronToad_UnityProject/Assets/Scripts/HeavyObject.cs index 486e53d..3a8a8a5 100644 --- a/IronToad_UnityProject/Assets/Scripts/HeavyObject.cs +++ b/IronToad_UnityProject/Assets/Scripts/HeavyObject.cs @@ -9,7 +9,7 @@ public abstract class HeavyObject : WaterObject { public float splashPower; public override void OnWaterEnter(WaterController water) { - water.CreateWave(transform.position,splashRadius,splashPower) + water.CreateWave(transform.position,splashRadius,splashPower); } } diff --git a/IronToad_UnityProject/Assets/Scripts/UIPanel.cs b/IronToad_UnityProject/Assets/Scripts/UIPanel.cs index 16c2886..5e7c4b1 100644 --- a/IronToad_UnityProject/Assets/Scripts/UIPanel.cs +++ b/IronToad_UnityProject/Assets/Scripts/UIPanel.cs @@ -30,6 +30,7 @@ public class UIPanel : MonoBehaviour private RectTransform rectTransform; private CanvasGroup canvasGroup; private Vector3 originalPos; + private bool isShowing = false; void Awake () { @@ -58,10 +59,13 @@ public class UIPanel : MonoBehaviour setShowState(); else setHideState(); + pauseGame(); } public void showPanel() { +// if (isShowing) +// return; float startAlpha = 0f; float endAlpha = 1f; Vector3 startPos = originalPos; @@ -92,11 +96,13 @@ public class UIPanel : MonoBehaviour canvasGroup.alpha = startAlpha + (endAlpha-startAlpha)*fadeCurve.Evaluate(val); rectTransform.anchoredPosition3D = startPos + (endPos-startPos)*showCurve.Evaluate(val); transform.localScale = startScale + (endScale-startScale)*showCurve.Evaluate(val); - }).setOnComplete(setShowState); + }).setOnComplete(setShowState).setIgnoreTimeScale(true); } public void hidePanel() { +// if (!isShowing) +// return; float startAlpha = 1f; float endAlpha = 0f; Vector3 startPos = originalPos; @@ -127,7 +133,7 @@ public class UIPanel : MonoBehaviour canvasGroup.alpha = startAlpha + (endAlpha-startAlpha)*fadeCurve.Evaluate(val); rectTransform.anchoredPosition3D = startPos + (endPos-startPos)*hideCurve.Evaluate(val); transform.localScale = startScale + (endScale-startScale)*hideCurve.Evaluate(val); - }).setOnComplete(setHideState); + }).setOnComplete(setHideState).setIgnoreTimeScale(true); } public void setShowState() @@ -137,6 +143,7 @@ public class UIPanel : MonoBehaviour canvasGroup.alpha = 1f; rectTransform.anchoredPosition3D = originalPos; transform.localScale = Vector3.one; + isShowing = true; } public void setHideState() @@ -144,6 +151,7 @@ public class UIPanel : MonoBehaviour canvasGroup.interactable = false; canvasGroup.blocksRaycasts = false; canvasGroup.alpha = 0f; + isShowing = false; } public void quitApplication() @@ -154,5 +162,16 @@ public class UIPanel : MonoBehaviour public void startGame() { NotificationServer.notify("show GameUI"); + unpauseGame(); + } + + public void pauseGame() + { + Time.timeScale = 0f; + } + + public void unpauseGame() + { + Time.timeScale = 1f; } } diff --git a/IronToad_UnityProject/Assets/Sound/Music.meta b/IronToad_UnityProject/Assets/Sound/Music.meta deleted file mode 100644 index a4f829c..0000000 --- a/IronToad_UnityProject/Assets/Sound/Music.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 1715d56e0d2b68246a82993db31014ab -folderAsset: yes -timeCreated: 1484979777 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/IronToad_UnityProject/Assets/Sound/SFX.meta b/IronToad_UnityProject/Assets/Sound/SFX.meta deleted file mode 100644 index 0c3fd08..0000000 --- a/IronToad_UnityProject/Assets/Sound/SFX.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: de5a3adcedb96f64183518ac89622ade -folderAsset: yes -timeCreated: 1484979777 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/IronToad_UnityProject/Assets/Textures.meta b/IronToad_UnityProject/Assets/Textures.meta deleted file mode 100644 index ffdd440..0000000 --- a/IronToad_UnityProject/Assets/Textures.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 2a6e699820a38a544acfc0015eb679a2 -folderAsset: yes -timeCreated: 1484972317 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/IronToad_UnityProject/Assets/_Scenes/LighthouseTestScene.unity b/IronToad_UnityProject/Assets/_Scenes/LighthouseTestScene.unity index adf24cc..a971ab3 100644 Binary files a/IronToad_UnityProject/Assets/_Scenes/LighthouseTestScene.unity and b/IronToad_UnityProject/Assets/_Scenes/LighthouseTestScene.unity differ