diff --git a/unity_Project/Assets/Scripts/PlayerSounds.cs b/unity_Project/Assets/Scripts/PlayerSounds.cs index 4658a25..020bf81 100644 --- a/unity_Project/Assets/Scripts/PlayerSounds.cs +++ b/unity_Project/Assets/Scripts/PlayerSounds.cs @@ -6,7 +6,7 @@ public class PlayerSounds : MonoBehaviour { public GameObject PlayerObject; private thirdPersonController playerController;//Player1 or Player2 object. Assign object component in inspector. //private Collider playerCollider; - public bool FootOnSand = true; + private bool FootOnSand = true; private AudioSource source; private float volLowRange = 0.5f; // Volume Low Range diff --git a/unity_Project/Assets/Scripts/magnetGun.cs b/unity_Project/Assets/Scripts/magnetGun.cs index 451a008..75b6164 100644 --- a/unity_Project/Assets/Scripts/magnetGun.cs +++ b/unity_Project/Assets/Scripts/magnetGun.cs @@ -42,7 +42,7 @@ public class magnetGun : MonoBehaviour { private Color lastTargetColour; - public GameObject magnetTipObject; + //public GameObject magnetTipObject; //----------------------- @@ -148,7 +148,7 @@ public class magnetGun : MonoBehaviour { private void pickUpItem(Collider item){ if (item != null) { - //_playerSoundScript.PlayPickUp(); + _playerSoundScript.PlayPickUp(); if (item == otherPlayer.GravityTarget){ otherPlayer.dropItem(item); @@ -259,13 +259,15 @@ public class magnetGun : MonoBehaviour { private void rotateInput(Collider item){ if (item != null) { - if (Input.GetButtonDown(L_BUTTON_INPUT)) - //_playerSoundScript.PlayRotateL(); // Rotate-Object Sound. ERROR: Held object continuously rotates + if (Input.GetButtonDown(L_BUTTON_INPUT)){ + _playerSoundScript.PlayRotateL(); // Rotate-Object Sound. ERROR: Held object continuously rotates StartCoroutine (rotateItem(item,new Vector3 (0,90,0),0.3f)); + } - if (Input.GetButtonDown(R_BUTTON_INPUT)) - //_playerSoundScript.PlayRotateR(); // Rotate-Object Sound. ERROR: Held object continuously rotates + if (Input.GetButtonDown(R_BUTTON_INPUT)){ + _playerSoundScript.PlayRotateR(); // Rotate-Object Sound. ERROR: Held object continuously rotates StartCoroutine (rotateItem(item,new Vector3 (90,0,0),0.3f)); + } } } diff --git a/unity_Project/Assets/_Scenes/MainLevel.unity b/unity_Project/Assets/_Scenes/MainLevel.unity index ca37812..8a7d430 100644 Binary files a/unity_Project/Assets/_Scenes/MainLevel.unity and b/unity_Project/Assets/_Scenes/MainLevel.unity differ