Browse Source

Revert "Fixed merge + turns off sparkles when rod inactive."

This reverts commit 0003065fc9.
master
Joshua Reason 9 years ago
parent
commit
48ad18aaa0
3 changed files with 12 additions and 10 deletions
  1. +2
    -9
      unity_Project/Assets/Scripts/MagnetLaser.cs
  2. +1
    -1
      unity_Project/Assets/Scripts/thirdPersonController.cs
  3. +9
    -0
      unity_Project/Assets/Textures.meta

+ 2
- 9
unity_Project/Assets/Scripts/MagnetLaser.cs View File

@ -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);
}

+ 1
- 1
unity_Project/Assets/Scripts/thirdPersonController.cs View File

@ -36,7 +36,7 @@ public class thirdPersonController : MonoBehaviour {
private float movementX;
private float movementY;
public bool grounded;
private bool grounded;
private Rigidbody rigidbody;

+ 9
- 0
unity_Project/Assets/Textures.meta View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 97def69cc8aa8f0458d67929f23873dd
folderAsset: yes
timeCreated: 1444371283
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Loading…
Cancel
Save