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