using UnityEngine;
using System.Collections;
public class InApplication : MonoBehaviour
{
///
///
///
private bool paused, focus;
///
/// 是否暂停
///
public bool Pause
{
get { return paused; }
}
///
/// 焦点获取
///
public bool Focus
{
get { return focus; }
}
///
///
///
private static InApplication instance = null;
///
///
///
public static InApplication Instance
{
get { return instance; }
}
///
///
///
void Awake()
{
instance = this;
}
/////
/////
/////
//void OnGUI()
//{
// if (paused)
// GUI.Label(new Rect(100, 100, 150, 30), "Game paused");
// if (focus)
// GUI.Label(new Rect(100, 150, 150, 30), "Game focused");
//}
///
/// focus
///
///
void OnApplicationPause(bool focusStatus)
{
paused = focusStatus;
}
///
/// focus
///
///
void OnApplicationFocus(bool focusStatus)
{
focus = focusStatus;
}
}