GameJam Progress Day 1

This commit is contained in:
2020-07-11 22:07:31 +02:00
parent aed66436a2
commit 05867d287b
23 changed files with 1078 additions and 54 deletions

View File

@@ -19,7 +19,7 @@ public class PlayerController : MonoBehaviour
public bool lockBoost = false;
public AudioClip boostSound;
public Vector2 pitchModifier;
public bool unstoppable = false;
private AudioSource audioSource;
private AIController aiController;
@@ -30,10 +30,7 @@ public class PlayerController : MonoBehaviour
{
this.audioSource = this.forceZone.transform.GetComponent<AudioSource>();
this.rb = GetComponent<Rigidbody>();
if (this.aiControlled)
{
this.aiController = GetComponent<AIController>();
}
this.aiController = GetComponent<AIController>();
}
@@ -41,11 +38,12 @@ public class PlayerController : MonoBehaviour
void Update()
{
float rotationDirection = Input.GetAxis("Horizontal" + this.playerNumber);
float movementDirection = Input.GetAxis("Vertical" + this.playerNumber);
float movementDirection = this.unstoppable ? 1 : Input.GetAxis("Vertical" + this.playerNumber);
float[] aiInput = new float[3];
this.rb.drag = this.idleDrag;
if(this.inputTimeout > 0) {
this.inputTimeout -= Time.deltaTime;
return;