public void StartTransition(Generics.Scene NextScene, bool isPortFramePos, Action act)
 {
     this.SetActiveChildren(true);
     this.setCameraDepth(NextScene);
     if (isPortFramePos)
     {
         this.setOnPortCirclePosition();
     }
     else
     {
         this.setDefaultPosition();
     }
     if (SingletonMonoBehaviour <UIPortFrame> .exist())
     {
         SingletonMonoBehaviour <UIPortFrame> .Instance.fadeOutCircleButtonLabel();
     }
     this.Reset();
     this.setBG(NextScene);
     iTween.ValueTo(base.get_gameObject(), iTween.Hash(new object[]
     {
         "from",
         0.1,
         "to",
         2500,
         "time",
         0.4f,
         "onupdate",
         "UpdateHandler",
         "oncomplete",
         "OnFinished"
     }));
     this.onfinished = act;
     this.isOver     = true;
 }
示例#2
0
 private void OnSelectedScene(Generics.Scene selectedScene)
 {
     if (mOnSelectedSceneListener != null)
     {
         mOnSelectedSceneListener(selectedScene);
     }
 }
 private void OnSelectedScene(Generics.Scene selectedScene)
 {
     if (this.mOnSelectedSceneListener != null)
     {
         this.mOnSelectedSceneListener.Invoke(selectedScene);
     }
 }
        private IEnumerator GotoNextScene(Generics.Scene NextScene)
        {
            if (OnSceneChangeCoroutine != null)
            {
                yield return(StartCoroutine(OnSceneChangeCoroutine));

                OnSceneChangeCoroutine = null;
            }
            AsyncOperation async = Application.LoadLevelAsync(NextScene.ToString());

            while (async.progress < 0.9f)
            {
                yield return(new WaitForEndOfFrame());
            }
            async.allowSceneActivation = true;
            setLive2D(NextScene);
            App.OnlyController = null;
            if (NextScene == Generics.Scene.Strategy)
            {
                yield return(new WaitForEndOfFrame());

                if (SingletonMonoBehaviour <UIShortCutMenu> .exist())
                {
                    SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsInputEnable = true;
                    SingletonMonoBehaviour <UIShortCutMenu> .Instance.LockOffControl();

                    SingletonMonoBehaviour <UIShortCutMenu> .Instance.LockTouchControl(isEnable : false);
                }
            }
        }
        public void SceneLoad(Generics.Scene NextScene)
        {
            App.OnlyController = dummyKey;
            App.isFirstUpdate  = true;
            if (SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsOpen)
            {
                SingletonMonoBehaviour <UIShortCutMenu> .Instance.CloseMenu();
            }
            if (SingletonMonoBehaviour <UIPortFrame> .exist())
            {
                SingletonMonoBehaviour <UIPortFrame> .Instance.isColliderEnabled = false;
            }
            if (SingletonMonoBehaviour <UIShortCutMenu> .exist())
            {
                SingletonMonoBehaviour <UIShortCutMenu> .Instance.LockTouchControl(isEnable : true);

                SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsInputEnable = false;
            }
            SingletonMonoBehaviour <FadeCamera> .Instance.FadeOut(0.2f, delegate
            {
                SceneAdjustNow(NextScene);
                if (SceneChangeAct != null)
                {
                    SceneChangeAct();
                    SceneChangeAct = null;
                }
                StartCoroutine(GotoNextScene(NextScene));
            });
        }
 private bool IsValidSelectable(PortManager portManager, DeckModel deckModel, UIPortMenuButton portMenuButton)
 {
     Generics.Scene scene = portMenuButton.GetScene();
     if (scene != Generics.Scene.Marriage)
     {
         return(SingletonMonoBehaviour <AppInformation> .Instance.IsValidMoveToScene(portMenuButton.GetScene()));
     }
     return(portManager.IsValidMarriage(deckModel.GetFlagShip().MemId));
 }
 private void LoadNextScene(Generics.Scene scene)
 {
     this.mAsyncOperation = Application.LoadLevelAsync(scene.ToString());
     this.mAsyncOperation.set_allowSceneActivation(false);
     if (this.cor != null)
     {
         Debug.LogError("coroutine is not null");
     }
     this.cor = base.StartCoroutine(this.LoadStart());
 }
示例#8
0
 private void LoadNextScene(Generics.Scene scene)
 {
     mAsyncOperation = Application.LoadLevelAsync(scene.ToString());
     mAsyncOperation.allowSceneActivation = false;
     if (cor != null)
     {
         Debug.LogError("coroutine is not null");
     }
     cor = StartCoroutine(LoadStart());
 }
 private void setLive2D(Generics.Scene NextScene)
 {
     if (NextScene == Generics.Scene.PortTop || NextScene == Generics.Scene.Strategy)
     {
         SingletonMonoBehaviour <Live2DModel> .Instance.Enable();
     }
     else
     {
         SingletonMonoBehaviour <Live2DModel> .Instance.Disable();
     }
 }
 private void setCameraDepth(Generics.Scene NextScene)
 {
     if (NextScene == Generics.Scene.Album || NextScene == Generics.Scene.Interior)
     {
         this.TransitionCamera.set_depth(5f);
     }
     else
     {
         this.TransitionCamera.set_depth(1.3f);
     }
 }
 private void setCameraDepth(Generics.Scene NextScene)
 {
     if (NextScene == Generics.Scene.Album || NextScene == Generics.Scene.Interior)
     {
         TransitionCamera.depth = 5f;
     }
     else
     {
         TransitionCamera.depth = 1.3f;
     }
 }
        public void LoadNextScene(Generics.Scene nextScene)
        {
            DebugUtils.SLog("LoadNextScene");
            this.StartLoadingAnimation();
            if (this.mAsyncOperation != null)
            {
                this.mAsyncOperation = null;
            }
            string text = nextScene.ToString();

            this.mAsyncOperation = Application.LoadLevelAsync(text);
            this.mAsyncOperation.set_allowSceneActivation(false);
            DebugUtils.SLog("LoadNextScene END");
        }
示例#13
0
        public void LoadNextScene(Generics.Scene nextScene)
        {
            DebugUtils.SLog("LoadNextScene");
            StartLoadingAnimation();
            if (mAsyncOperation != null)
            {
                mAsyncOperation = null;
            }
            string levelName = nextScene.ToString();

            mAsyncOperation = Application.LoadLevelAsync(levelName);
            mAsyncOperation.allowSceneActivation = false;
            DebugUtils.SLog("LoadNextScene END");
        }
 public void LoadNextScene(Generics.Scene nextScene, Action parallelAction)
 {
     this.mCamera.set_depth(100f);
     base.get_gameObject().SetActive(true);
     Debug.Log(string.Empty);
     this.StartLoadingAnimation();
     this.mParallelAction = parallelAction;
     base.StartCoroutine(this.StartParallelAction());
     if (this.mAsyncOperation != null)
     {
         this.mAsyncOperation = null;
     }
     this.mAsyncOperation = Application.LoadLevelAsync(nextScene.ToString());
     this.mAsyncOperation.set_allowSceneActivation(false);
 }
 public void LoadNextScene(Generics.Scene nextScene, Action parallelAction)
 {
     mCamera.depth = 100f;
     base.gameObject.SetActive(true);
     Debug.Log(string.Empty);
     StartLoadingAnimation();
     mParallelAction = parallelAction;
     StartCoroutine(StartParallelAction());
     if (mAsyncOperation != null)
     {
         mAsyncOperation = null;
     }
     mAsyncOperation = Application.LoadLevelAsync(nextScene.ToString());
     mAsyncOperation.allowSceneActivation = false;
 }
        public bool IsValidMoveToScene(Generics.Scene sceneType)
        {
            if (sceneType == Generics.Scene.Repair)
            {
                int nDockMax = this._areaModel.NDockMax;
                return(this.IsValidMoveToRepairScene(nDockMax));
            }
            if (sceneType != Generics.Scene.Arsenal)
            {
                return(true);
            }
            int currentAreaID = this.CurrentAreaID;

            return(this.IsValidMoveToArsenalScene(currentAreaID));
        }
 private void SceneAdjustNext(Generics.Scene NextScene)
 {
     if (NextScene == Generics.Scene.Strategy)
     {
         SingletonMonoBehaviour <UIShortCutMenu> .Instance.LockOffControl();
     }
     else if (!SingletonMonoBehaviour <UIPortFrame> .exist())
     {
         Util.Instantiate(PortFramePrefab);
     }
     if (NextScene == Generics.Scene.PortTop)
     {
         SingletonMonoBehaviour <UIShortCutMenu> .Instance.LockOffControl();
     }
 }
        private void Start()
        {
            this._SM       = SingletonMonoBehaviour <SoundManager> .Instance;
            this._instance = VitaSaveManager.Instance;
            this._instance.Open(this);
            this._Label_status = GameObject.Find("Label_status").GetComponent <UILabel>();
            this.BackScene     = Generics.Scene.PortTop;
            this._Set_Status(SaveLoad.Now_State.Idle);
            this._SceneName = Application.get_loadedLevelName();
            Debug.Log("Application.loadedLevelName: " + this._SceneName);
            Hashtable hashtable = null;

            if (RetentionData.GetData() != null)
            {
                hashtable = RetentionData.GetData();
            }
            if (hashtable == null || (int)hashtable.get_Item("rootType") != 1)
            {
                this._Set_Execute_Mode(SaveLoad.Execute_Mode.Save_Mode);
                if ((int)hashtable.get_Item("rootType") == 21)
                {
                    this.BackScene = Generics.Scene.Strategy;
                }
            }
            else
            {
                this._Set_Execute_Mode(SaveLoad.Execute_Mode.Load_Mode);
            }
            if (hashtable != null)
            {
                RetentionData.Release();
            }
            if (this._Execute_Mode == SaveLoad.Execute_Mode.Load_Mode)
            {
                DebugUtils.SLog("ロードを実行します");
                this._DO_LOAD();
            }
            else if (this._Execute_Mode == SaveLoad.Execute_Mode.Save_Mode)
            {
                Debug.Log("セーブを実行します");
                this._DO_SAVE();
                SingletonMonoBehaviour <PortObjectManager> .Instance.PortTransition.EndTransition(null, true, true);
            }
        }
示例#19
0
        private void Start()
        {
            _SM       = SingletonMonoBehaviour <SoundManager> .Instance;
            _instance = VitaSaveManager.Instance;
            _instance.Open(this);
            _Label_status = GameObject.Find("Label_status").GetComponent <UILabel>();
            BackScene     = Generics.Scene.PortTop;
            _Set_Status(Now_State.Idle);
            _SceneName = Application.loadedLevelName;
            Debug.Log("Application.loadedLevelName: " + _SceneName);
            Hashtable hashtable = null;

            if (RetentionData.GetData() != null)
            {
                hashtable = RetentionData.GetData();
            }
            if (hashtable == null || (int)hashtable["rootType"] != 1)
            {
                _Set_Execute_Mode(Execute_Mode.Save_Mode);
                if ((int)hashtable["rootType"] == 21)
                {
                    BackScene = Generics.Scene.Strategy;
                }
            }
            else
            {
                _Set_Execute_Mode(Execute_Mode.Load_Mode);
            }
            if (hashtable != null)
            {
                RetentionData.Release();
            }
            if (_Execute_Mode == Execute_Mode.Load_Mode)
            {
                DebugUtils.SLog("ロ\u30fcドを実行します");
                _DO_LOAD();
            }
            else if (_Execute_Mode == Execute_Mode.Save_Mode)
            {
                Debug.Log("セ\u30fcブを実行します");
                _DO_SAVE();
                SingletonMonoBehaviour <PortObjectManager> .Instance.PortTransition.EndTransition(null);
            }
        }
        private IEnumerator InstantiateSceneChange(Generics.Scene NextScene, bool destroyPrevScene)
        {
            yield return(null);

            if (OnSceneChangeCoroutine != null)
            {
                yield return(StartCoroutine(OnSceneChangeCoroutine));
            }
            if (SceneObject != null && destroyPrevScene)
            {
                DestroyScene();
            }
            else
            {
                GameObject sceneObject = SceneObject;
            }
            SceneAdjustNow(NextScene);
            setNowScene(NextScene.ToString(), isLoadLevel: false);
            if (SceneChangeAct != null)
            {
                SceneChangeAct();
                SceneChangeAct = null;
            }
            SceneAdjustNext(NextScene);
            setLive2D(NextScene);
            yield return(new WaitForEndOfFrame());

            if (SceneMoveCount > 5)
            {
                yield return(Resources.UnloadUnusedAssets());

                GC.Collect();
                yield return(new WaitForEndOfFrame());

                SceneMoveCount = 0;
            }
            else
            {
                SceneMoveCount++;
            }
            SceneObject        = Util.Instantiate(ScenePrefabs[SceneNo[NextScene.ToString()]]);
            App.OnlyController = null;
        }
示例#21
0
        public bool IsValidMoveToScene(Generics.Scene sceneType)
        {
            switch (sceneType)
            {
            case Generics.Scene.Repair:
            {
                int nDockMax = _areaModel.NDockMax;
                return(IsValidMoveToRepairScene(nDockMax));
            }

            case Generics.Scene.Arsenal:
            {
                int currentAreaID = CurrentAreaID;
                return(IsValidMoveToArsenalScene(currentAreaID));
            }

            default:
                return(true);
            }
        }
示例#22
0
 protected override void Awake()
 {
     base.Awake();
     if (curveDic == null)
     {
         curveDic = new Dictionary <CurveType, AnimationCurve>();
     }
     if (curves != null)
     {
         for (int i = 0; i < curves.Length; i++)
         {
             if (!curveDic.ContainsKey(curves[i].type))
             {
                 curveDic.Add(curves[i].type, curves[i].curve);
             }
         }
     }
     NextLoadType  = LoadType.Ship;
     NextLoadScene = Generics.Scene.Scene_BEF;
 }
 protected override void Awake()
 {
     base.Awake();
     if (AppInformation.curveDic == null)
     {
         AppInformation.curveDic = new Dictionary <AppInformation.CurveType, AnimationCurve>();
     }
     if (this.curves != null)
     {
         for (int i = 0; i < this.curves.Length; i++)
         {
             if (!AppInformation.curveDic.ContainsKey(this.curves[i].type))
             {
                 AppInformation.curveDic.Add(this.curves[i].type, this.curves[i].curve);
             }
         }
     }
     this.NextLoadType  = AppInformation.LoadType.Ship;
     this.NextLoadScene = Generics.Scene.Scene_BEF;
 }
 private void setBG(Generics.Scene NextScene)
 {
     if (this.SceneBG_FilePaths.ContainsKey(NextScene))
     {
         this.TransitionBG.mainTexture = (Resources.Load(this.SceneBG_FilePaths.get_Item(NextScene)) as Texture);
     }
     else
     {
         this.TransitionBG.mainTexture = (Resources.Load("Textures/Common/BG/CommonBG") as Texture);
     }
     if (NextScene == Generics.Scene.Organize || NextScene == Generics.Scene.Arsenal || NextScene == Generics.Scene.Repair)
     {
         this.TransitionBG.width  = 1040;
         this.TransitionBG.height = 589;
     }
     else
     {
         this.TransitionBG.width  = 960;
         this.TransitionBG.height = 544;
     }
 }
        private void SceneAdjustNow(Generics.Scene NextScene)
        {
            switch (NextScene)
            {
            case Generics.Scene.Remodel:
                if (!SingletonMonoBehaviour <UIPortFrame> .exist())
                {
                    Util.Instantiate(PortFramePrefab);
                }
                break;

            case Generics.Scene.ImprovementArsenal:
                if (!SingletonMonoBehaviour <UIPortFrame> .exist())
                {
                    Util.Instantiate(PortFramePrefab);
                }
                SingletonMonoBehaviour <UIPortFrame> .Instance.setVisibleHeader(isVisible : true);

                break;

            case Generics.Scene.Item:
                if (!SingletonMonoBehaviour <UIPortFrame> .exist())
                {
                    Util.Instantiate(PortFramePrefab);
                }
                SingletonMonoBehaviour <UIPortFrame> .Instance.setVisibleHeader(isVisible : true);

                break;
            }
            if (NowScene.ToLower() == Generics.Scene.Remodel.ToString().ToLower())
            {
                SingletonMonoBehaviour <UIPortFrame> .Instance.setVisibleHeader(isVisible : true);
            }
            else if (NowScene.ToLower() == Generics.Scene.Strategy.ToString().ToLower())
            {
                SingletonMonoBehaviour <Live2DModel> .Instance.DestroyCache();
            }
        }
 public void InstantiateScene(Generics.Scene NextScene, bool isForceFadeOut = false)
 {
     App.OnlyController = new KeyControl();
     if (NowTutorialGuide != null)
     {
         NowTutorialGuide.Hide();
     }
     if (SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsOpen)
     {
         SingletonMonoBehaviour <UIShortCutMenu> .Instance.CloseMenu();
     }
     if (SingletonMonoBehaviour <UIPortFrame> .exist())
     {
         SingletonMonoBehaviour <UIPortFrame> .Instance.isColliderEnabled = false;
     }
     if (SingletonMonoBehaviour <UIShortCutMenu> .exist())
     {
         SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsInputEnable = false;
         SingletonMonoBehaviour <UIShortCutMenu> .Instance.LockTouchControl(isEnable : true);
     }
     PortTransition.isTransitionNow = true;
     if (isUseCrossFade(NextScene) && !isForceFadeOut)
     {
         PortTransition.StartTransition(NextScene, isPortFramePos: true, delegate
         {
             InstantiateSceneChange(NextScene);
         });
     }
     else
     {
         SingletonMonoBehaviour <FadeCamera> .Instance.FadeOut(0.2f, delegate
         {
             InstantiateSceneChange(NextScene);
         });
     }
 }
 public static bool isPrefabSecene(Generics.Scene scene)
 {
     return(scene == Generics.Scene.Organize || scene == Generics.Scene.Remodel || scene == Generics.Scene.Supply || scene == Generics.Scene.Arsenal || scene == Generics.Scene.Duty || scene == Generics.Scene.PortTop || scene == Generics.Scene.Strategy || scene == Generics.Scene.Repair);
 }
 private void InstantiateSceneChange(Generics.Scene NextScene)
 {
     StartCoroutine(InstantiateSceneChange(NextScene, destroyPrevScene: true));
 }
 public ButtonInfos(UIButton btn, Generics.Scene iScene)
 {
     this._uiBtn  = btn;
     this._iScene = iScene;
 }
示例#30
0
 public static void LoadLevelAsyncScene(MonoBehaviour mono, Generics.Scene scene, Action callback)
 {
     mono.StartCoroutine(LoadLevelAsyncScene(scene.ToString(), callback));
 }