コード例 #1
0
 void Start()
 {
     /// LoadManager.startLoad(this, "file:///" + Application.dataPath + "/StreamingAssets/zombie_windows", delegate()
     //{ ZombieFactory._Instance.LoadLeval(1); });
     Invoke("LoadNextLevel", 1f);
     currentZombieCount = BossFactory.Updayezombie();
 }
コード例 #2
0
 /// <summary>
 /// 加载下一关
 /// </summary>
 public void LoadNextLevel()
 {
     Debug.Log("加载当前关卡:" + currentLevel);
     BossFactory.LoadLevel(currentLevel);
     BossFactory.Updayezombie();
     //通知ui显示
     GameMainUI.Instance.InitGameMainData(currentLevel.ToString(), BossFactory.Instance.getCurrentLevelzombieCount.ToString());
 }
コード例 #3
0
 /// <summary>
 /// 检测结束死亡
 /// </summary>
 public void ZombieDeadNotify()
 {
     currentZombieCount--;
     if (currentZombieCount <= Random.Range(1, 3))
     {
         currentZombieCount += BossFactory.Updayezombie();
     }
     if (currentZombieCount <= 0)
     {
         Debug.Log("Game Over.....");
         RootCanvas.setActive("BoderRedImage/GameSucess", true);
         EventTriggerListener.GetName("SucessNextButton").onClick = delegate(GameObject obj)
         {
             currentLevel++;
             LoadNextLevel();
             RootCanvas.setActive("BoderRedImage/GameSucess", false);
         };
         if (currentLevel >= 6)
         {
             RootCanvas.setActive("BoderRedImage/AllSucess", true);
         }
     }
 }