diff --git a/IronToad_UnityProject/Assets/Animations/WaveRing.controller b/IronToad_UnityProject/Assets/Animations/WaveRing.controller index b6d10d8..6766e28 100644 Binary files a/IronToad_UnityProject/Assets/Animations/WaveRing.controller and b/IronToad_UnityProject/Assets/Animations/WaveRing.controller differ diff --git a/IronToad_UnityProject/Assets/Scripts/BoatController.cs b/IronToad_UnityProject/Assets/Scripts/BoatController.cs index 3a6a134..e381ce8 100644 --- a/IronToad_UnityProject/Assets/Scripts/BoatController.cs +++ b/IronToad_UnityProject/Assets/Scripts/BoatController.cs @@ -6,7 +6,7 @@ using UnityEngine; public class BoatController : BuoyantObject { public float trunSpeed = 0.5f; - + public float breakSpeed = 20f; // Use this for initialization void Start() { @@ -26,8 +26,15 @@ public class BoatController : BuoyantObject { } void OnCollisionEnter(Collision collision) { - if (collision.gameObject.CompareTag("Rock")) - NotificationServer.notify("show GameOverPanel"); + if (collision.gameObject.CompareTag("Rock")) { + + float forwardHitSpeed = Vector3.Project(collision.relativeVelocity, transform.forward).magnitude; + + Debug.Log("Forward hit:" + forwardHitSpeed); + if (forwardHitSpeed > breakSpeed) { + NotificationServer.notify("show GameOverPanel"); + } + } } diff --git a/IronToad_UnityProject/Assets/Sound/Music.meta b/IronToad_UnityProject/Assets/Sound/Music.meta new file mode 100644 index 0000000..5559b43 --- /dev/null +++ b/IronToad_UnityProject/Assets/Sound/Music.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1715d56e0d2b68246a82993db31014ab +folderAsset: yes +timeCreated: 1485006712 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/IronToad_UnityProject/Assets/Sound/SFX.meta b/IronToad_UnityProject/Assets/Sound/SFX.meta new file mode 100644 index 0000000..5548a6b --- /dev/null +++ b/IronToad_UnityProject/Assets/Sound/SFX.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: de5a3adcedb96f64183518ac89622ade +folderAsset: yes +timeCreated: 1485006712 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/IronToad_UnityProject/Assets/Textures.meta b/IronToad_UnityProject/Assets/Textures.meta new file mode 100644 index 0000000..ffdd440 --- /dev/null +++ b/IronToad_UnityProject/Assets/Textures.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2a6e699820a38a544acfc0015eb679a2 +folderAsset: yes +timeCreated: 1484972317 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/IronToad_UnityProject/Assets/_Scenes/GreyBox_Prototype.meta b/IronToad_UnityProject/Assets/_Scenes/GreyBox_Prototype.meta new file mode 100644 index 0000000..47507ca --- /dev/null +++ b/IronToad_UnityProject/Assets/_Scenes/GreyBox_Prototype.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 338533d5d159c00478a9fb5321b7d922 +folderAsset: yes +timeCreated: 1485007190 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/IronToad_UnityProject/Assets/water/planeWater.prefab b/IronToad_UnityProject/Assets/water/planeWater.prefab index bcacca6..908261e 100644 Binary files a/IronToad_UnityProject/Assets/water/planeWater.prefab and b/IronToad_UnityProject/Assets/water/planeWater.prefab differ