コード例 #1
0
        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);
        }