private void SetTalkProcess(TutorialProcess process, TutorialProcess nProcess) { GameObject btn = process.focusGameObject; TalkManager.Instance.SetTalkData(process.data); TutorialTriggerListener.GetListener(btn.gameObject).onClick += go => { if (TalkManager.Instance.isTalking == false) { if (nProcess._tutorialType == TutorialType.End) { StepEnd(process); } else { NextProcess(process, nProcess); } } }; TalkManager.Instance.SetTalkData(process.data); }
private void SetListProcess(TutorialProcess process, TutorialProcess nProcess) { GameObject focus; if (process.focusGameObject.GetComponent <WndEditor.ItemListContainer> ()) { int childIdx; if (Int32.TryParse(process.data [0], out childIdx)) { if (process.focusGameObject.transform.childCount > childIdx) { focus = process.focusGameObject.transform.GetChild(childIdx).gameObject; } else { Debug.Log("Have Not Child"); return; } } else { Debug.Log("Have Not Child"); return; } } else { Debug.Log("Set Error"); return; } if (process.listnerType == EventListnerType.onClick) { TutorialTriggerListener.GetListener(focus).onClick += go => { if (TalkManager.Instance.isTalking == false) { if (nProcess._tutorialType == TutorialType.End) { StepEnd(process); } else { NextProcess(process, nProcess, recListArray); } } }; } else { if (process.gameObjectAry.Length > 1) { GameObject from = process.gameObjectAry [0]; GameObject to = process.gameObjectAry [1]; TutorialTriggerListener.GetListener(focus).onBeginDrag += go => { CanvasManager.Instance.SetRaycastCanvas(process.gameObjectAry[0].GetComponent <Canvas> ()); foreach (RaycastResult result in CanvasManager.Instance.GetRaycastResult()) { } }; TutorialTriggerListener.GetListener(focus).onEndDrag += go => { var results = CanvasManager.Instance.GetRaycastResult(); if (results.Count > 0) { foreach (RaycastResult result in results) { if (result.gameObject == to) { if (nProcess._tutorialType == TutorialType.End) { StepEnd(process); return; } else { NextProcess(process, nProcess, recListArray); return; } } } string[] startTwo = new string[process.data.Length - 1]; Array.Copy(process.data, 1, startTwo, 0, startTwo.Length); SetControlError(process.gameObjectAry[0], startTwo); } else { string[] startTwo = new string[process.data.Length - 1]; Array.Copy(process.data, 1, startTwo, 0, startTwo.Length); SetControlError(process.gameObjectAry[0], startTwo); Debug.Log("End False"); } }; } else { if (process.gameObjectAry.Length == 0) { Debug.Log("Have Not Drag Begin And End"); } else { Debug.Log("Have Not Drag End"); } } } }
private void SetButtonProcess(TutorialProcess process, TutorialProcess nProcess) { if (process.listnerType == EventListnerType.onClick) { TutorialTriggerListener.GetListener(process.focusGameObject).onClick += go => { if (process.focusGameObject == focusGameObject) { if (nProcess._tutorialType == TutorialType.End) { StepEnd(process); } else { NextProcess(process, nProcess); } } }; } else { if (process.gameObjectAry.Length > 1) { GameObject from = process.gameObjectAry [0]; GameObject to = process.gameObjectAry [process.gameObjectAry.Length - 1]; TutorialTriggerListener.GetListener(from).onBeginDrag += go => { CanvasManager.Instance.SetRaycastCanvas(process.focusGameObject.GetComponent <Canvas> ()); foreach (RaycastResult result in CanvasManager.Instance.GetRaycastResult()) { Debug.Log(result.gameObject.name); } }; TutorialTriggerListener.GetListener(from).onEndDrag += go => { var results = CanvasManager.Instance.GetRaycastResult(); if (results.Count > 0) { foreach (RaycastResult result in results) { if (result.gameObject == to) { if (nProcess._tutorialType == TutorialType.End) { StepEnd(process); return; } else { NextProcess(process, nProcess); return; } } } SetControlError(process.focusGameObject, process.data); } else { SetControlError(process.focusGameObject, process.data); } }; } else { if (process.gameObjectAry.Length == 0) { Debug.Log("Have Not Drag Begin And End"); } else { Debug.Log("Have Not Drag End"); } } } }