Vodka vision implemented

This commit is contained in:
shakurass 2014-04-26 17:28:14 -06:00
commit a4bf704306
15 changed files with 277 additions and 27 deletions

View file

@ -1,15 +0,0 @@
using UnityEngine;
using System.Collections;
public class GotStabbed : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
}

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 2cd24e31979a5b84f813edbbbfa3d661
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

View file

@ -5,6 +5,8 @@ public class Patron : MonoBehaviour {
public GameObject[] destinations;
public int currentDestIndex = 0;
public Material evilMat;
public Material neutralMat;
private NavMeshAgent nva;
@ -31,6 +33,10 @@ public class Patron : MonoBehaviour {
//Instantiate (playerExplosion, other.transform.position, other.transform.rotation);
Destroy(gameObject);
}
if (other.tag == "VVAura") {
renderer.material = evilMat;
}
// gameController.AddScore (scoreValue);
//

View file

@ -5,18 +5,29 @@ public class PlayerController : MonoBehaviour {
public float speed = 10;
public float nextFire;
public float fireRate;
public float delay;
public GameObject shank;
public Transform playerAngle;
public Transform shankSpawn;
public GameObject vvAura;
public int swigCounter;
void Update()
{
int swigs = 0;
if (Input.GetButton("Fire1") && Time.time > nextFire)
{
nextFire = Time.time + fireRate;
nextFire = Time.time + delay;
Instantiate(shank, shankSpawn.position, playerAngle.rotation);
}
if (Input.GetButton("ActivateVV") && swigs <= swigCounter && Time.time > nextFire)
{
nextFire = Time.time + delay * 2;
Instantiate (vvAura, rigidbody.position, rigidbody.rotation);
swigs++;
}
}
void FixedUpdate() {