0
Basically it’s the following: I have 2 codes, 1 that serves to reset the level when I throw the ball:
public Player player;
public float resetTimer = 5f;
void Update () {
if (player.holdingBall == false) {
resetTimer -= Time.deltaTime;
if (resetTimer <= 0) {
SceneManager.LoadScene ("Game");
}
And this one right here is a timer that goes to an end game screen
void Start ()
{
timerSeconds = GetComponent<Text> ();
}
// Update is called once per frame
void Update ()
{
timer -= Time.deltaTime;
timerSeconds.text = timer.ToString("f0");
if (timer <= 0)
{
Application.LoadLevel (LevelToLoad);
}
}
The problem is this: when I throw the ball after 5 seconds the level reset but the timer also returns to 30 and did not want you to turn around. How do I do it? I should have put the two together or...