Question by
LearningWhileScrewing · May 17, 2017 at 06:58 PM ·
scripting problem
What am i doing wrong?
using System.Collections; using System.Collections.Generic; using UnityEngine;
public class GameplayController : MonoBehaviour {
[SerializeField]
private GameObject pausePanel;
// Use this for initialization
void Awake () {
pausePanel.SetActive (false);
}
public void PauseGame() {
Time.timeScale = 0f;
pausePanel.SetActive (true);
}
public void ResumeGame() {
Time.timeScale = 1f;
pausePanel.SetActive (false);
}
public void QuitGame() {
Time.timeScale = 1f;
Application.LoadLevel ("MainMenu");
}
}
Comment
At this point - nothing. The code seems fine and you have not told us anything about what your issue is.
Your answer
Follow this Question
Related Questions
CS0029 Error cannot implicity convert type 'bool' 'UnityEngine.Rendering.ShadowCastingMode' 1 Answer
Help with this code 1 Answer
Need help disabling a script in another GameObject 1 Answer
Unity Interactive Tutorials Scripting Problem 0 Answers
SmoothDamp in my FPS controller. Does not feel like it is working. 0 Answers