////////////////////////////////////////////////////////////////////////////////// //CutScene public void ShowCutScene(eSceneType type) { if (Network.BattleStageInfo == null || Network.BattleStageInfo.Difficulty == pe_Difficulty.Hard) { return; } if (CutsceneInfo != null) { CurrentMenu = GameMenu.Battle; // 삭제하면 튜토 1-3에서 클릭안되는 버그생김 if (CutsceneInfo.CutSceneInfo.SceneType == type && CutsceneInfo.Targets.Count > 0) { TimeManager.Instance.SetPause(true); bShowed = true; TutorialDialog obj = NGUITools.AddChild(contents.gameObject, DialogPrefab).GetComponent <TutorialDialog>(); obj.Init(CutsceneInfo.Targets[0]); CutsceneInfo.Targets.RemoveAt(0); m_Prefabs.Add(obj.gameObject); gameObject.SetActive(true); return; } else { CutsceneInfo = null; } return; } if ((type == eSceneType.PreAll || type == eSceneType.PreAll_Wave3) && CheckBattleStart() == true) { SetConditionOK(); } }
private void SetDialogTarget(TargetInfo info) { Debug.LogFormat("SetDialogTarget", info.Desc); CurrentDialogTarget = info; TutorialDialog obj = NGUITools.AddChild(contents.gameObject, DialogPrefab).GetComponent <TutorialDialog>(); obj.Init(info); m_Prefabs.Add(obj.gameObject); }
public void OnBtnClick() { if (bShowed == false || (CurrentInfo != null && CurrentInfo.Targets.Exists(e => e.type == eTutorialType.Drag)) || m_TargetsCollider.Count == 0 && m_Prefabs.Count == 0) { return; } CheckTargetCollider(); if (m_TargetsCollider.Count == 0) { while (m_Prefabs.Count > 0) { Destroy(m_Prefabs[0]); m_Prefabs.RemoveAt(0); } if (CutsceneInfo != null) {//Cut Scene if (CutsceneInfo.Targets.Count > 0) { TutorialDialog obj = NGUITools.AddChild(contents.gameObject, DialogPrefab).GetComponent <TutorialDialog>(); obj.Init(CutsceneInfo.Targets[0]); CutsceneInfo.Targets.RemoveAt(0); m_Prefabs.Add(obj.gameObject); bShowed = true; } else {//Cut Scene end TutorialInfo _cut_scene = CutsceneInfo; CutsceneInfo = null; if ((_cut_scene.CutSceneInfo.SceneType == eSceneType.PreAll || _cut_scene.CutSceneInfo.SceneType == eSceneType.PreAll_Wave3) && CheckBattleStart() == true) { SetConditionOK(); } else { if (Completed == true || (CurrentMenu == GameMenu.Battle && CurrentInfo.Condition != null && CurrentInfo.Condition.Type == eConditionType.BattleEndPopup) ) { gameObject.SetActive(false); } TimeManager.Instance.SetPause(false); } } } else {//Tutorial CurrentInfo.Targets.Remove(CurrentDialogTarget); TargetInfo info = CurrentInfo.Targets.Find(e => e.Menu == CurrentMenu && e.type == eTutorialType.Dialog); if (info != null) { SetDialogTarget(info); return; } CurrentDialogTarget = null; if (CurrentInfo.AfterNetworking == true) { gameObject.SetActive(false); return; } else if (CurrentInfo.Condition == null || CurrentInfo.Condition.IsConditionOK == true) { SetNextTutorial(); } } } }