Updated visuals and polish

This commit is contained in:
2020-01-27 16:31:38 +01:00
parent 0d80cee4aa
commit 12dbfae935
39 changed files with 1486 additions and 28 deletions

View File

@@ -9,17 +9,24 @@ public class GameManager : MonoBehaviour
{
public AudioClip goalSound;
[Header("Tankstellen")]
public int scorePlayer1 = 0;
public int scorePlayer2 = 0;
public int maxGoals = 1;
[Header("Player")]
public float inputTimeout = 0.3f;
public Transform player1;
public Transform player2;
public GameObject[] players;
[Header("Boll")]
public Transform ball;
public Transform player1Initial, player2Initial, ballInitial;
public GameObject[] players;
private Transform player1Initial, player2Initial, ballInitial;
[Header("Misc")]
public Vector3[] initialPositions;
public Quaternion[] initialRotations;
@@ -60,7 +67,7 @@ public class GameManager : MonoBehaviour
{
//Debug.Log("Calculating matrix: Vector(" + Time.deltaTime * Random.Range(12, 123) + ")");
//Debug.Log("Hacking pentagon: in pr0gress...");
this.scoreLabel.text = "Score: " + this.scorePlayer1 + " : " + this.scorePlayer2;
this.scoreLabel.text = this.scorePlayer1 + " : " + this.scorePlayer2;
if (this.scorePlayer1 >= maxGoals)
{
@@ -96,11 +103,11 @@ public class GameManager : MonoBehaviour
this.players[i].transform.position = this.initialPositions[i];
this.players[i].transform.rotation = this.initialRotations[i];
this.players[i].GetComponent<Rigidbody>().velocity = Vector3.zero;
this.players[i].GetComponent<PlayerController>().InputTimeout(this.inputTimeout);
}
this.ball.position = this.ballInitial.position;
this.ball.GetComponent<Rigidbody>().velocity = Vector3.zero;
}
}