Resume Button error
- by user3178359
i have two class. if i press button pause it can
show button resume, retry,menu and the game time is paused.
but when i press the resume the game time still paused. help me plase
how to continue the game time ??
code for button pause :
using UnityEngine;
using System.Collections;
public class pause : MonoBehaviour {
public GUITexture showMenu;
public GUITexture btnResume;
public bool gamePaused = false;
void OnMouseDown() {
gamePaused = true;
Time.timeScale = 0;
showMenu.pixelInset = new Rect(220, 200, showMenu.pixelInset.width, showMenu.pixelInset.height);
btnResume.pixelInset = new Rect(300, 300, btnResume.pixelInset.width, btnResume.pixelInset.height);
code for button resume :
using UnityEngine;
using System.Collections;
public class btResume : pause {
//public GUITexture shoe;
void onMouseDown() {
base.gamePaused = false;
Time.timeScale = 1;
btnResume.pixelInset = new Rect(300, -300, btnResume.pixelInset.width, btnResume.pixelInset.height);
showMenu.pixelInset = new Rect(220, -200, showMenu.pixelInset.width, showMenu.pixelInset.height);
}
}