GameJam Progress Day 1
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user