Пример #1
0
 /// <summary>
 /// 工厂方法:获得唯一实例
 /// </summary>
 /// <returns>屏幕管理器</returns>
 public static ScreenManager GetInstance()
 {
     return ScreenManager.synObject == null ? ScreenManager.synObject = new ScreenManager() : ScreenManager.synObject;
 }
Пример #2
0
 /// <summary>
 /// 重置唯一实例,用于读取保存数据时
 /// </summary>
 /// <param name="sm">反序列化后的实例</param>
 public static void ResetSynObject(ScreenManager sm)
 {
     ScreenManager.synObject = sm;
 }
Пример #3
0
 /// <summary>
 /// 设置场景管理器引用
 /// </summary>
 public void SetScreenManager(ScreenManager scr)
 {
     this.Screen = scr;
 }