Smoothed animation for taking a swig.

This commit is contained in:
shakurass 2014-04-27 11:55:25 -06:00
commit d0a546ffac
16 changed files with 1306 additions and 481 deletions

View file

@ -3,6 +3,8 @@ using System.Collections;
public class Demon : MonoBehaviour {
public Renderer characterSprite;
void OnTriggerEnter(Collider other) {
//Instantiate(explosion, transform.position, transform.rotation);
@ -13,7 +15,7 @@ public class Demon : MonoBehaviour {
}
if (other.tag == "VVAura") {
renderer.material.color = Color.red;
characterSprite.renderer.material.color = Color.red;
}
}
}

View file

@ -68,11 +68,12 @@ public class PlayerController : MonoBehaviour {
playerAngle.eulerAngles = new Vector3(0f, -270f, 0f);
if (moveVertical > 0)
playerAngle.eulerAngles = new Vector3(0f, -90f, 0f);
// rigidbody.MovePosition (rigidbody.position + movement * speed * Time.deltaTime);
// rigidbody.position.Normalize ();
Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical);
rigidbody.MovePosition (rigidbody.position + movement * speed * Time.deltaTime);
rigidbody.position.Normalize ();
rigidbody.velocity = movement * speed;
rigidbody.freezeRotation = true;
}

View file

@ -5,8 +5,6 @@ public class WalkAI : MonoBehaviour {
public GameObject[] destinations;
public int currentDestIndex = 0;
public Material evilMat;
public Material neutralMat;
private NavMeshAgent nva;