Updated visuals and polish
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user