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 }
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", ""); } }
private void Awake() { if (_instance == null) { _instance = this; } else if (this != _instance) { Destroy(gameObject); } }