Introduced neon visuals

This commit is contained in:
2019-10-09 22:09:14 +02:00
parent 6e81cecb0a
commit 0663f863f3
23 changed files with 1979 additions and 195 deletions

View File

@@ -9,6 +9,8 @@ public class PlayerController : MonoBehaviour
public bool useController = false;
public float rotationSpeed = 100;
public float movementSpeed = 100;
public float drag = 1;
public float idleDrag = 2;
public Rigidbody rb;
public GameObject forceZone;
public float boostSpeed = 0;
@@ -38,6 +40,8 @@ public class PlayerController : MonoBehaviour
float movementDirection = Input.GetAxis("Vertical" + this.playerNumber);
float[] aiInput = new float[3];
this.rb.drag = this.idleDrag;
//Override any inputs if this instance is to be controlled by AI
if (this.aiControlled)
{
@@ -66,13 +70,14 @@ public class PlayerController : MonoBehaviour
//Forward
if (movementDirection > 0)
{
this.rb.drag = this.drag;
this.rb.AddRelativeForce(Vector3.forward * this.movementSpeed * Time.deltaTime, ForceMode.Impulse);
}
//Zurück
if (movementDirection < 0)
{
this.rb.AddRelativeForce(Vector3.back * this.movementSpeed / 3 * Time.deltaTime, ForceMode.Impulse);
this.rb.AddRelativeForce(Vector3.back * this.movementSpeed / 2 * Time.deltaTime, ForceMode.Impulse);
}
//Boost