private void FlyToSkill(int iconId, Vector3 startPos, int equipPos, Action <Vector3> callBack) { CreateNewPage("UI/MainUI/FlyIcon.prefab", iconId, startPos, true, (go) => { EventDispatcher.Instance.DispatchEvent(new Show_UI_Event(UIConfig.MainUI)); var evn = new MainUI_FlyIcon_Event(equipPos, callBack); evn.FlyIcon.From = startPos; evn.FlyIcon.Delay = 0.3f; evn.FlyIcon.Time = 0.5f; evn.FlyIcon.Stay = 0.2f; evn.SetAlphaTo(1.0f, 1.0f); evn.FlyIcon.FlyObject = go; EventDispatcher.Instance.DispatchEvent(new MainUI_FlyIcon2_Event(evn)); }); }
private void PlayOpenAnim() { ObjManager.Instance.MyPlayer.StopMove(); ObjManager.Instance.MyPlayer.LeaveAutoCombat(); EventDispatcher.Instance.DispatchEvent(new UI_BlockMainUIInputEvent(1)); EventDispatcher.Instance.DispatchEvent(new Close_UI_Event(UIConfig.MissionFrame)); EventDispatcher.Instance.DispatchEvent(new Show_UI_Event(UIConfig.MainUI)); if (PlayerDataManager.Instance.GetFlag(3011)) { return; } CreateNewPage("UI/MainUI/FlyIcon.prefab", 1201914, Vector3.zero, false, (go) => { EventDispatcher.Instance.DispatchEvent(new Show_UI_Event(UIConfig.MainUI)); var evn = new MainUI_FlyIcon_Event(); evn.ToUiName = Table.GetClientConfig(703).Value; evn.FlyIcon.From = Vector3.zero; evn.FlyIcon.Delay = 0.8f; evn.FlyIcon.Time = 0.8f; evn.FlyIcon.Stay = 0.4f; evn.FlyIcon.FlyObject = go; evn.Callback = (endPos) => { EventDispatcher.Instance.DispatchEvent(new Event_UnlockEraBook(0)); PlayerDataManager.Instance.SetFlag(3011, true); GuideManager.Instance.StartGuide(10020); var tbMaya = Table.GetMayaBase(0); if (tbMaya != null && tbMaya.FinishFlagId > 0) { PlayerDataManager.Instance.SetFlag(tbMaya.FinishFlagId, true); EraManager.Instance.RefreshFlagId(tbMaya.FinishFlagId); } EventDispatcher.Instance.DispatchEvent(new UI_BlockMainUIInputEvent(0)); }; EventDispatcher.Instance.DispatchEvent(new Show_UI_Event(UIConfig.MainUI)); EventDispatcher.Instance.DispatchEvent(new MainUI_FlyIcon2_Event(evn)); EventDispatcher.Instance.DispatchEvent(new UI_BlockMainUIInputEvent(1)); }); }
private void FlyToMayaBook(int iconId, Vector3 startPos, Action <Vector3> callBack) { //UI/MainUI/BookPage.prefab CreateNewPage("UI/MainUI/FlyIcon.prefab", iconId, startPos, true, (go) => { var path = Table.GetClientConfig(703); var evn = new MainUI_FlyIcon_Event(path.Value, callBack); evn.FlyIcon.From = startPos; evn.FlyIcon.Delay = 0.2f; evn.FlyIcon.Time = 0.7f; evn.FlyIcon.Stay = 0.1f; evn.SetAlphaTo(1.0f, 0.6f); evn.FlyIcon.UseBezier = true; evn.FlyIcon.UseRotate = true; evn.FlyIcon.FlyObject = go; EventDispatcher.Instance.DispatchEvent(new UIEvent_EraGetAlpha(0.8f, 0.01f, () => { EventDispatcher.Instance.DispatchEvent(new Show_UI_Event(UIConfig.MainUI)); Logger.Debug("...UIEvent_EraGetAlpha ..CallBack"); EventDispatcher.Instance.DispatchEvent(new MainUI_FlyIcon2_Event(evn)); })); }); }