Vodka vision implemented
This commit is contained in:
parent
97e36bd4eb
commit
a4bf704306
15 changed files with 277 additions and 27 deletions
|
|
@ -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 () {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2cd24e31979a5b84f813edbbbfa3d661
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
|
|
@ -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);
|
||||
//
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue