29 lines
656 B
C#
29 lines
656 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using GeneralTools;
|
|
public class GameManager : SingletonBaseAttribute<GameManager>
|
|
{
|
|
private bool isStarted = false;
|
|
|
|
public override void IStart()
|
|
{
|
|
KeyDownManager.Instance.AddKeyDownAction(KeyCode.Escape, () => { Application.Quit(); }, "退出程序", false, 5);
|
|
}
|
|
public override void GameStart()
|
|
{
|
|
//这里开始
|
|
//.....
|
|
isStarted = true;
|
|
}
|
|
private void Update()
|
|
{
|
|
if (!isStarted)
|
|
return;
|
|
}
|
|
public override void IOnApplicationQuit()
|
|
{
|
|
|
|
}
|
|
} |