提交 65b35d66 编写于 作者: 6 625115905@qq.com

No commit message

No commit message
......@@ -125,18 +125,14 @@ public class GameManager : SingletonAutoMono<GameManager>
//关闭所有UI
UIManager.Instance.HidePanel("ESCpanel");
UIManager.Instance.HidePanel("BattlePanel");
if (Instance.player != null) {
if(Instance.player)
Destroy(Instance.player.gameObject);
}
if (Instance.vehicle != null) {
if(Instance.vehicle)
Destroy(Instance.vehicle.gameObject);
}
GameManager.Instance.magicStone = 0;
// if (this.transform.Find("RoomGenerator") != null) {
// }
RoomGenerator.Instance.DestroyMap();
if(RoomGenerator.Instance)
RoomGenerator.Instance.DestroyMap();
}
//游戏通关结束
public void GameEnd()
......
......@@ -13,6 +13,8 @@ public class SingletonMono<T> : MonoBehaviour where T: MonoBehaviour
{
get
{
if (instance == null)
return null;
//继承了Mono的脚本 不能够直接new
//只能通过拖动到对象上 或者 通过 加脚本的api AddComponent去加脚本
//U3D内部帮助我们实例化它
......
......@@ -83,7 +83,7 @@ public class SkillPanelCtrl : BasePanel
turretIsClicked = turretList[index];
//Debug.Log("TurretX is clicked!");
BuildingManager.Instance.build(index);
CountX.text = (System.Convert.ToInt32(CountX.text) - 1).ToString();
//CountX.text = (System.Convert.ToInt32(CountX.text) - 1).ToString();
//switch (System.Convert.ToInt32(CountX.text))
//{
// case 0:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册