From 48ad18aaa04350f8fbb245dde6f0ff44a7d663d3 Mon Sep 17 00:00:00 2001 From: Joshua Reason Date: Sat, 10 Oct 2015 20:36:35 +1100 Subject: [PATCH] Revert "Fixed merge + turns off sparkles when rod inactive." This reverts commit 0003065fc9fedb0e901ddc85c256454a27425154. --- unity_Project/Assets/Scripts/MagnetLaser.cs | 11 ++--------- unity_Project/Assets/Scripts/thirdPersonController.cs | 2 +- unity_Project/Assets/Textures.meta | 9 +++++++++ 3 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 unity_Project/Assets/Textures.meta diff --git a/unity_Project/Assets/Scripts/MagnetLaser.cs b/unity_Project/Assets/Scripts/MagnetLaser.cs index fd4e0cc..56fa56f 100644 --- a/unity_Project/Assets/Scripts/MagnetLaser.cs +++ b/unity_Project/Assets/Scripts/MagnetLaser.cs @@ -5,8 +5,7 @@ public class MagnetLaser : MonoBehaviour { private LineRenderer lr; public GameObject player; - public GameObject rodStart; - public GameObject magnetSparkles; + public GameObject rodstart; public int segments; public float randomSize; private magnetGun gun; @@ -26,13 +25,9 @@ public class MagnetLaser : MonoBehaviour { void Update () { if (gun.GravityTarget != null) { - if (magnetSparkles != null) - magnetSparkles.SetActive(true); - - lr.enabled = true; lr.SetVertexCount(segments+1); - lr.SetPosition(0, rodStart.transform.position); + lr.SetPosition(0, rodstart.transform.position); lr.SetPosition (segments,gun.GravityTarget.transform.position); Vector3 normalizedV =(gun.GravityTarget.transform.position - player.transform.position); @@ -53,8 +48,6 @@ public class MagnetLaser : MonoBehaviour { } else { lr.enabled = false; - if (magnetSparkles != null) - magnetSparkles.SetActive(false); } diff --git a/unity_Project/Assets/Scripts/thirdPersonController.cs b/unity_Project/Assets/Scripts/thirdPersonController.cs index fb01f1a..bb2de41 100644 --- a/unity_Project/Assets/Scripts/thirdPersonController.cs +++ b/unity_Project/Assets/Scripts/thirdPersonController.cs @@ -36,7 +36,7 @@ public class thirdPersonController : MonoBehaviour { private float movementX; private float movementY; - public bool grounded; + private bool grounded; private Rigidbody rigidbody; diff --git a/unity_Project/Assets/Textures.meta b/unity_Project/Assets/Textures.meta new file mode 100644 index 0000000..8915b1d --- /dev/null +++ b/unity_Project/Assets/Textures.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 97def69cc8aa8f0458d67929f23873dd +folderAsset: yes +timeCreated: 1444371283 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: