private void EnterEscortFlagShip(StrategyShipCharacter Character, ShipModel FlagShip) { if (FlagShip != null) { Character.ChangeCharacter(FlagShip); this.DelayActionFrame(2, delegate { if (EscortFlagShipModel != FlagShip) { isPlayVoice = false; } Character.Enter(delegate { if (!isPlayVoice) { Character.PlayVoice(EscortOrganizeTaskManager.GetEscortManager().EditDeck); EscortFlagShipModel = FlagShip; isPlayVoice = true; } }); }); } }
public IEnumerator ShipChangeCoroutine(ShipModel Ship, int index) { bool isCharaChanged = false; isShipChanging = true; FadeLabel(isFadeIn: false); if (!isFirstCall) { TweenPos.onFinished.Clear(); TweenPos.PlayReverse(); this.DelayAction(TweenPos.duration, delegate { this.Live2DRender.ChangeCharacter(Ship, -1, isDamaged: false); isCharaChanged = true; }); while (!isCharaChanged) { yield return(null); } } else { Live2DRender.ChangeCharacter(Ship, -1, isDamaged: false); isFirstCall = false; } float size = 1.2f; int posy = -48; if (Ship.Lov > 200) { size = 1.25f; posy = -60; } if (Ship.Lov > 500) { size = 1.3f; posy = -72; } if (Ship.Lov > 700) { size = 1.35f; posy = -84; } Live2DRender.transform.localScale = new Vector3(size, size, size); Live2DRender.transform.AddLocalPositionY(posy); yield return(new WaitForEndOfFrame()); if (Ship.IsMarriage()) { SakuraPar.Play(); Ring.SetActive(isActive: true); } else { SakuraPar.Stop(); Ring.SetActive(isActive: false); } TweenPos.onFinished.Clear(); TweenPos.PlayForward(); this.DelayAction(TweenPos.duration, delegate { this.ShipVoice = ShipUtils.PlayEndingVoice(Ship, 28); this.SetLabel(Ship); this.FadeLabel(isFadeIn: true); this.isShipChanging = false; }); yield return(new WaitForEndOfFrame()); SingletonMonoBehaviour <Live2DModel> .Instance.ChangeMotion(Live2DModel.MotionType.Secret); SingletonMonoBehaviour <Live2DModel> .Instance.Play(); }
private IEnumerator Start() { Stopwatch stopWatch = new Stopwatch(); stopWatch.Reset(); stopWatch.Start(); mStateManager = new StateManager <State>(State.NONE); mStateManager.OnPush = OnPushState; mStateManager.OnResume = OnResumeState; mStateManager.OnPop = OnPopState; SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsInputEnable = false; DOTween.Init(); iTween.Init(base.gameObject); mPortManager = new PortManager(SingletonMonoBehaviour <AppInformation> .Instance.CurrentAreaID); mKeyController = new KeyControl(); mDeckModel = mPortManager.UserInfo.GetDeck(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeckID); SingletonMonoBehaviour <PortObjectManager> .Instance.setNowScene(Generics.Scene.PortTop.ToString(), isLoadLevel : false); SingletonMonoBehaviour <PortObjectManager> .Instance.SceneObject = base.gameObject; mUIShipCharacter.ChangeCharacter(); Transform transform = mUIShipCharacter.transform; Vector3 enterPosition = mUIShipCharacter.getEnterPosition(); transform.localPositionX(enterPosition.x); Dictionary <FurnitureKinds, FurnitureModel> furnitures = mPortManager.GetFurnitures(mDeckModel.Id); mUserInterfacePortInteriorManager.InitializeFurnitures(mDeckModel, furnitures); mUserInterfacePortInteriorManager.SetOnRequestJukeBoxEvent(OnRequestJukeBoxEvent); if (SingletonMonoBehaviour <UIPortFrame> .exist()) { SingletonMonoBehaviour <UIPortFrame> .Instance.CircleUpdateInfo(mPortManager); SingletonMonoBehaviour <UIPortFrame> .Instance.UpdateHeaderInfo(mPortManager); SingletonMonoBehaviour <UIPortFrame> .Instance.isColliderEnabled = false; SingletonMonoBehaviour <UIPortFrame> .Instance.SetOnClickCircleButtoListener(OnTouchHideMenu); } mUIInteriorFurniturePreviewWaiter.SetOnBackListener(OnFinishedFurniturePreview); mUserInterfacePortMenuManager.SetOnSelectedSceneListener(OnSelectedSceneListener); mUserInterfacePortMenuManager.SetOnFirstOpendListener(OnFirstOpendListener); mUIPortCameraControlMode.SetOnFinishedModeListener(OnFinishedOfficeModeListener); mKeyController.ClearKeyAll(); mKeyController.firstUpdate = true; mKeyController.IsRun = false; ChangeShipDepth(ShipDepth.HigherPortFrame); TutorialInstantiate = TutorialCheck(OnCloseTutorialDialog); if (TutorialInstantiate == null) { mKeyController.IsRun = true; } else { mKeyController.IsRun = false; } stopWatch.Stop(); for (int frame = 0; frame < stopWatch.Elapsed.Milliseconds / 60; frame++) { yield return(new WaitForEndOfFrame()); } mStateManager.PushState(State.FirstOpenMenu); }