Vodka vision implemented
This commit is contained in:
parent
97e36bd4eb
commit
a4bf704306
15 changed files with 277 additions and 27 deletions
|
|
@ -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