public void LoadNextLevel() { EndLevel(); if (m_currentMapIdx < MapList.Count - 1) { ++m_currentMapIdx; } else { DialogsController.GetInstance().ShowDialog(DialogType.MapSelectorMenu); return; } var mapPahs = MapList.GetMapPaths(m_currentMapIdx); if (mapPahs == null) { return; } ResetTempMapData(); MapInfo map_info = (mapPahs.GetMapPrefab()).GetComponent <MapInfo>(); map_info.m_mapName = mapPahs.Name; map_info.m_mapIcon = mapPahs.GetMapIcon(); GameProgress.SetMap(m_currentMapIdx, false); DialogsController.GetInstance().ShowMapDescriptionMenu(m_currentMapIdx); }
private void OnDestroy() { if (m_instance == this) { m_instance = null; } }
public void OnButtonEndLevelPressed() { WorldControl.GetInstance().EndLevel(); DialogsController.GetInstance().ShowDialog(DialogType.StartMenu); SetActive(false); }
private void Start() { if (Instance == null) { Instance = this; } controller = GetComponent <DialogsController>(); LoadDialogs(); }
private void Awake() { if (m_instance != null) { Debug.Assert(m_instance == this, "Second DialogsController insance"); return; } m_instance = this; }
public void ShowBook(DialogsController dialogController) { this.dialogController = dialogController; gameObject.SetActive(true); book = gameObject.transform.Find("Book").gameObject; book.GetComponent <Fader>().fadeObjectWithChilds(FadeDirection.In, closingAnimationTime); animator = book.GetComponent <Animator>(); //animator.Play("BookOpen"); }
public void SetPause(bool isPause) { m_isPaused = isPause; Time.timeScale = isPause? 0.0f : m_gameSpeed; if (IsInGame) { if (isPause) { DialogsController.GetInstance().ShowDialog(DialogType.PauseMenu); } else { DialogsController.GetInstance().CloseAllDialogs(); } } }
public void OnButtonSelectLevelPressed() { DialogsController.GetInstance().ShowDialog(DialogType.MapSelectorMenu); SetActive(false); }
public void OnButtonBackPressed() { DialogsController.GetInstance().ShowDialog(DialogType.StartMenu); SetActive(false); }
private void OnMapSelected(int mapIdx) { DialogsController.GetInstance().ShowMapDescriptionMenu(mapIdx); SetActive(false); }