diff --git a/unity_Project/Assets/Character/Character_Animation.controller b/unity_Project/Assets/Character/Character_Animation.controller index 98c99da..6b770a4 100644 Binary files a/unity_Project/Assets/Character/Character_Animation.controller and b/unity_Project/Assets/Character/Character_Animation.controller differ diff --git a/unity_Project/Assets/Scripts/magnetGun.cs b/unity_Project/Assets/Scripts/magnetGun.cs index c31eaf0..5b4f165 100644 --- a/unity_Project/Assets/Scripts/magnetGun.cs +++ b/unity_Project/Assets/Scripts/magnetGun.cs @@ -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); diff --git a/unity_Project/Assets/Scripts/movebetween.cs b/unity_Project/Assets/Scripts/movebetween.cs new file mode 100644 index 0000000..a8faceb --- /dev/null +++ b/unity_Project/Assets/Scripts/movebetween.cs @@ -0,0 +1,32 @@ +using UnityEngine; +using System.Collections; + +public class movebetween : MonoBehaviour { + + public GameObject start; + public GameObject end; + + public float distance; + + private Vector3 startPos; + private Vector3 endPos; + + void Start(){ + startPos = start.transform.position; + endPos = end.transform.position; + + distance = Vector3.Distance (startPos, endPos) / Vector3.Distance (gameObject.transform.position, startPos); + } + + // Update is called once per frame + void Update () { + + transform.position = startPos + (endPos - startPos) / distance; + + + } + + void FixedUpdate(){ + distance = Vector3.Distance (startPos, endPos) / Vector3.Distance (gameObject.transform.position, startPos); + } +} diff --git a/unity_Project/Assets/Scripts/movebetween.cs.meta b/unity_Project/Assets/Scripts/movebetween.cs.meta new file mode 100644 index 0000000..fc05c5c --- /dev/null +++ b/unity_Project/Assets/Scripts/movebetween.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 982dc55d872537543bff1a62c3aaf20b +timeCreated: 1443999774 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/unity_Project/Assets/_Scenes/MainLevel.unity b/unity_Project/Assets/_Scenes/MainLevel.unity index b1e71a7..68ed0b7 100644 Binary files a/unity_Project/Assets/_Scenes/MainLevel.unity and b/unity_Project/Assets/_Scenes/MainLevel.unity differ