![]()
using UnityEngine;
using System.Collections;
public class Pauser : MonoBehaviour
{
private bool paused = false;
private GameOverScriptP PauseMenu;
void Start ()
{
PauseMenu = GetComponent<GameOverScriptP> ();
}
// Update is called once per frame
void Update ()
{
if (Input.GetKeyUp (KeyCode.P)) {
paused = !paused;
}
if (paused)
Time.timeScale = 0;
PauseMenu.enabled = true;
else
Time.timeScale = 1;
PauseMenu.enabled = false;
}
}
Assets/UI Scripts/Pauser.cs(29,36): error CS1525: Unexpected symbol `else’
I am working on my most ambitious game ever lol and I cant even get the pause script to working haha :)must be a easy mistake I am missing. Can someone help? Thank you.