Browse Source

Minecart follows track.

Added backwards walk + cleaned character animation tree
fixed UI anchors
master
Joshua Reason 9 years ago
parent
commit
759a760893
5 changed files with 45 additions and 1 deletions
  1. BIN
      unity_Project/Assets/Character/Character_Animation.controller
  2. +1
    -1
      unity_Project/Assets/Scripts/magnetGun.cs
  3. +32
    -0
      unity_Project/Assets/Scripts/movebetween.cs
  4. +12
    -0
      unity_Project/Assets/Scripts/movebetween.cs.meta
  5. BIN
      unity_Project/Assets/_Scenes/MainLevel.unity

BIN
unity_Project/Assets/Character/Character_Animation.controller View File


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

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

+ 32
- 0
unity_Project/Assets/Scripts/movebetween.cs View File

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

+ 12
- 0
unity_Project/Assets/Scripts/movebetween.cs.meta View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 982dc55d872537543bff1a62c3aaf20b
timeCreated: 1443999774
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

BIN
unity_Project/Assets/_Scenes/MainLevel.unity View File


Loading…
Cancel
Save