Ejemplo n.º 1
0
    void BattleEnd(bool isWin)
    {
        isStartBattle = false;
        if (isWin)
        {
            PopUpControler.CallPopUp("winlose", "WIN", "", "");

            foreach (int levelID in LevelLoader.getLevelData().unlockedlevelID)
            {
                DB_LevelData.GetLevel(levelID).Unlock();
            }
        }
        else
        {
            PopUpControler.CallPopUp("winlose", "LOSE", "", "");
        }

        FindObjectOfType <PlayerData_Battle> ().ReduceItemDurability(isWin);

        DB_LevelData.SaveLevelData();

#if UNITY_EDITOR
        UnityEditor.EditorApplication.isPaused = true;
#elif UNITY_ANDROID
#endif
    }
Ejemplo n.º 2
0
 public void LoadLevel()
 {
     int[] eqStat = FindObjectOfType <PlayerData_Battle> ().GetEqStatus();
     if (eqStat[0] != -1 && eqStat[1] != -1)
     {
         if (selectedLevel != -1)
         {
             ResourcesUIControl.TurnUION(false);
             SceneLoader.LoadScene(3);
             LevelLoader.LoadLevel(selectedLevel);
         }
         else
         {
             PopUpControler.CallPopUp(
                 "notice",
                 "Select A Level",
                 "Please select Avaiable level before battle Start",
                 "");
         }
     }
     else
     {
         PopUpControler.CallPopUp(
             "notice",
             "Check Equipment",
             "Please wear some equipment before battle, wear a WEAPON and ARMOR",
             "");
     }
 }
Ejemplo n.º 3
0
 private void Awake()
 {
     if (_instance == null)
     {
         _instance = this;
     }
     else if (this != _instance)
     {
         Destroy(gameObject);
     }
 }