Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma strict
- private static var paused : boolean = false;
- static function Pause()
- {
- if (!paused)
- {
- Time.timeScale = 0;
- paused = true;
- Screen.lockCursor = false;
- }
- }
- static function UnPause()
- {
- if (paused)
- {
- Time.timeScale = 1;
- paused = false;
- Screen.lockCursor = true;
- }
- }
- static function IsPaused()
- {
- return paused;
- }
Advertisement
Add Comment
Please, Sign In to add comment