Esempio n. 1
0
        public void SetCustomMode()
        {
            dialogKeyController       = App.OnlyController;
            dialogKeyController.IsRun = false;
            ((Component)BauxiSuccess).transform.localPositionX(1000f);
            ((Component)BauxiField).transform.localPositionX(1000f);
            key             = new KeyControl(0, 5);
            key.isLoopIndex = false;
            key.setChangeValue(-2f, 1f, 2f, -1f);
            App.OnlyController = key;
            ((Component)BauxiSuccess).transform.parent.SetActive(isActive: true);
            ModeProcessor = GetComponent <ModeProcessor>();
            ModeProcessor.addMode("Top", TopModeRun, TopModeEnter, TopModeExit);
            ModeProcessor.addMode("SupplyConfirm", SupplyConfirmModeRun, SupplyConfirmModeEnter, SupplyConfirmModeExit);
            ModeProcessor.addMode("RepairConfirm", RepairConfirmModeRun, RepairConfirmModeEnter, RepairConfirmModeExit);
            ModeProcessor.addMode("RepairKitConfirm", RepairKitConfirmModeRun, RepairKitConfirmModeEnter, RepairKitConfirmModeExit);
            ModeProcessor.addMode("OrganizeDetail", OrganizeDetailModeRun, OrganizeDetailModeEnter, OrganizeDetailModeExit);
            ModeProcessor.addMode("OrganizeList", OrganizeListModeRun, OrganizeListModeEnter, OrganizeListModeExit);
            ModeProcessor.addMode("OrganizeListDetail", OrganizeListDetailModeRun, OrganizeListDetailModeEnter, OrganizeListDetailModeExit);
            FocusBanner = ShipStates[0];
            UIRebellionOrgaizeShipBanner[] shipStates = ShipStates;
            foreach (UIRebellionOrgaizeShipBanner uIRebellionOrgaizeShipBanner in shipStates)
            {
                uIRebellionOrgaizeShipBanner.SetOnClick(OnClickBanner);
            }
            BannerFocusAnim(isEnable: true);
            OrganizeMng = new OrganizeManager(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.AreaId);
            StrategyTopTaskManager.Instance.setActiveStrategy(isActive: false);
            SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsInputEnable = false;
            SingletonMonoBehaviour <Live2DModel> .Instance.Disable();

            ListParent.SetBackButtonEnable(isEnable: false);
            StrategyTopTaskManager.Instance.UIModel.HowToStrategy.isForceShow();
            isInitialize = false;
        }
        private void UpdateView(DeckModel deckModel)
        {
            int num   = 0;
            int count = deckModel.Count;

            UIRebellionOrgaizeShipBanner[] shipStates = this.ShipStates;
            for (int i = 0; i < shipStates.Length; i++)
            {
                UIRebellionOrgaizeShipBanner uIRebellionOrgaizeShipBanner = shipStates[i];
                int nIndex = num + 1;
                uIRebellionOrgaizeShipBanner.SetShipData(deckModel.GetShip(num), nIndex);
                uIRebellionOrgaizeShipBanner.SetShipIndex(num);
                num++;
            }
            if (this.FocusBanner != null)
            {
                this.BannerFocusAnim(false);
                this.FocusBanner = this.ShipStates[this.key.Index];
                this.BannerFocusAnim(true);
            }
            this.DeckNoLabel.text            = deckModel.Name;
            this.DeckNoLabel.supportEncoding = false;
            this.DeckNoIcon.mainTexture      = (Resources.Load("Textures/Common/DeckFlag/icon_deck" + deckModel.Id) as Texture2D);
            if (deckModel.IsActionEnd())
            {
                this.DeckActionEnd.SetActive(true);
                ShortcutExtensions.DOKill(this.DeckActionEnd, false);
                ShortcutExtensions.DOLocalRotate(this.DeckActionEnd, new Vector3(0f, 0f, 300f), 0f, 1);
                TweenSettingsExtensions.SetEase <Tweener>(ShortcutExtensions.DOLocalRotate(this.DeckActionEnd, new Vector3(0f, 0f, 360f), 0.8f, 1), 30);
            }
            else
            {
                this.DeckActionEnd.SetActive(false);
            }
        }
Esempio n. 3
0
        private void UpdateView(DeckModel deckModel)
        {
            int num   = 0;
            int count = deckModel.Count;

            UIRebellionOrgaizeShipBanner[] shipStates = ShipStates;
            foreach (UIRebellionOrgaizeShipBanner uIRebellionOrgaizeShipBanner in shipStates)
            {
                int nIndex = num + 1;
                uIRebellionOrgaizeShipBanner.SetShipData(deckModel.GetShip(num), nIndex);
                uIRebellionOrgaizeShipBanner.SetShipIndex(num);
                num++;
            }
            if (FocusBanner != null)
            {
                BannerFocusAnim(isEnable: false);
                FocusBanner = ShipStates[key.Index];
                BannerFocusAnim(isEnable: true);
            }
            DeckNoLabel.text            = deckModel.Name;
            DeckNoLabel.supportEncoding = false;
            DeckNoIcon.mainTexture      = (Resources.Load("Textures/Common/DeckFlag/icon_deck" + deckModel.Id) as Texture2D);
            if (deckModel.IsActionEnd())
            {
                DeckActionEnd.SetActive(isActive: true);
                DeckActionEnd.DOKill();
                DeckActionEnd.DOLocalRotate(new Vector3(0f, 0f, 300f), 0f, RotateMode.FastBeyond360);
                DeckActionEnd.DOLocalRotate(new Vector3(0f, 0f, 360f), 0.8f, RotateMode.FastBeyond360).SetEase(Ease.OutBounce);
            }
            else
            {
                DeckActionEnd.SetActive(isActive: false);
            }
        }
Esempio n. 4
0
 private void OnClickBanner(int index)
 {
     BannerFocusAnim(isEnable: false);
     FocusBanner = ShipStates[index];
     BannerFocusAnim(isEnable: true);
     GotoOrganize();
     key.SilentChangeIndex(index);
 }
 private void SetBannerColliderEnable(bool isEnable)
 {
     UIRebellionOrgaizeShipBanner[] shipStates = this.ShipStates;
     for (int i = 0; i < shipStates.Length; i++)
     {
         UIRebellionOrgaizeShipBanner uIRebellionOrgaizeShipBanner = shipStates[i];
         uIRebellionOrgaizeShipBanner.GetComponent <BoxCollider2D>().set_enabled(isEnable);
     }
 }
Esempio n. 6
0
        private IEnumerator StepTutorialInstantiateForWaitFirstTutorial(TutorialModel model, Action OnFinish)
        {
            SingletonMonoBehaviour <TutorialGuideManager> .Instance.CheckAndShowFirstTutorial(model, TutorialGuideManager.TutorialID.PortTopText, null);

            SingletonMonoBehaviour <TutorialGuideManager> .Instance.CheckAndShowFirstTutorial(model, TutorialGuideManager.TutorialID.RepairInfo, delegate
            {
                UIRebellionOrgaizeShipBanner component2 = ((Component)SingletonMonoBehaviour <TutorialGuideManager> .Instance.GetTutorialDialog().View.FindChild("ShipBanner")).GetComponent <UIRebellionOrgaizeShipBanner>();
                ShipModel[] ships2 = SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.GetShips();
                int num2           = 1;
                for (int j = 0; j < ships2.Length; j++)
                {
                    if ((float)(ships2[j].NowHp / ships2[j].MaxHp) < 0.7f)
                    {
                        num2 = j;
                        break;
                    }
                }
                component2.SetShipData(ships2[num2], num2 + 1);
            });

            SingletonMonoBehaviour <TutorialGuideManager> .Instance.CheckAndShowFirstTutorial(model, TutorialGuideManager.TutorialID.SupplyInfo, delegate
            {
                UIRebellionOrgaizeShipBanner component = ((Component)SingletonMonoBehaviour <TutorialGuideManager> .Instance.GetTutorialDialog().View.FindChild("ShipBanner")).GetComponent <UIRebellionOrgaizeShipBanner>();
                ShipModel[] ships = SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.GetShips();
                int num           = 1;
                for (int i = 0; i < ships.Length; i++)
                {
                    if (ships[i].AmmoRate < 50.0 || ships[i].FuelRate < 50.0)
                    {
                        num = i;
                        break;
                    }
                }
                component.SetShipData(ships[num], num + 1);
            });

            while (!(SingletonMonoBehaviour <TutorialGuideManager> .Instance.GetTutorialDialog() != null))
            {
                yield return(null);
            }
            SingletonMonoBehaviour <TutorialGuideManager> .Instance.GetTutorialDialog().OnClosed = delegate
            {
                this.StepTutorialInstantiate(model);
                if (OnFinish != null)
                {
                    OnFinish();
                }
            };
        }
 private void TopModeRun()
 {
     if (this.key.IsChangeIndex)
     {
         if (this.key.prevIndex == 4 && this.key.IsDownDown())
         {
             this.key.Index = 4;
             return;
         }
         if (this.key.prevIndex == 1 && this.key.IsUpDown())
         {
             this.key.Index = 1;
             return;
         }
         this.BannerFocusAnim(false);
         this.FocusBanner = this.ShipStates[this.key.Index];
         this.BannerFocusAnim(true);
         SoundUtils.PlaySE(SEFIleInfos.CommonCursolMove, null);
     }
     else if (this.key.IsMaruDown())
     {
         this.GotoOrganize();
         SoundUtils.PlaySE(SEFIleInfos.CommonEnter1, null);
     }
     else if (this.key.IsShikakuDown())
     {
         this.GotoSupplyConfirm();
     }
     else if (this.key.IsSankakuDown() && this.FocusBanner.ShipModel != null)
     {
         this.GotoRepairConfirm();
     }
     else if (this.key.IsBatuDown())
     {
         this.BackToSailSelect();
     }
     else if (this.key.IsRSRightDown())
     {
         this.ChangeDeck(true);
     }
     else if (this.key.IsRSLeftDown())
     {
         this.ChangeDeck(false);
     }
 }
Esempio n. 8
0
 private void TopModeRun()
 {
     if (key.IsChangeIndex)
     {
         if (key.prevIndex == 4 && key.IsDownDown())
         {
             key.Index = 4;
             return;
         }
         if (key.prevIndex == 1 && key.IsUpDown())
         {
             key.Index = 1;
             return;
         }
         BannerFocusAnim(isEnable: false);
         FocusBanner = ShipStates[key.Index];
         BannerFocusAnim(isEnable: true);
         SoundUtils.PlaySE(SEFIleInfos.CommonCursolMove, null);
     }
     else if (key.IsMaruDown())
     {
         GotoOrganize();
         SoundUtils.PlaySE(SEFIleInfos.CommonEnter1, null);
     }
     else if (key.IsShikakuDown())
     {
         GotoSupplyConfirm();
     }
     else if (key.IsSankakuDown() && FocusBanner.ShipModel != null)
     {
         GotoRepairConfirm();
     }
     else if (key.IsBatuDown())
     {
         BackToSailSelect();
     }
     else if (key.IsRSRightDown())
     {
         ChangeDeck(isNext: true);
     }
     else if (key.IsRSLeftDown())
     {
         ChangeDeck(isNext: false);
     }
 }
Esempio n. 9
0
 private void OnDestroy()
 {
     ShipStates               = null;
     key                      = null;
     FocusBanner              = null;
     SupplyMng                = null;
     RepairMng                = null;
     OrganizeMng              = null;
     ModeProcessor            = null;
     dialogKeyController      = null;
     repairDockModel          = null;
     Prefab_RepairConfim      = null;
     repairConfim             = null;
     Prefab_RepairKitConfim   = null;
     repairKitConfim          = null;
     Prefab_OrganizeDetailMng = null;
     Prefab_OrganizeList      = null;
     OrganizeDetailMng        = null;
     DeckNoIcon               = null;
     DeckNoLabel              = null;
     ListSelectShipModel      = null;
     CurrentDeck              = null;
 }
Esempio n. 10
0
        private void BackToSailSelect()
        {
            StrategyTopTaskManager.Instance.UIModel.HowToStrategy.isForceHide();
            StrategyTopTaskManager.Instance.GetInfoMng().updateFooterInfo(isUpdateMaterial: true);
            dialogKeyController.IsRun = true;
            StrategyTopTaskManager.GetSailSelect().CloseCommonDialog();
            StrategyTopTaskManager.Instance.setActiveStrategy(isActive: true);
            SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsInputEnable = true;
            SingletonMonoBehaviour <Live2DModel> .Instance.Enable();

            ListParent.SetActive(isActive: false);
            if (CurrentDeck.GetFlagShip() == null)
            {
                StrategyTopTaskManager.GetSailSelect().SearchAndChangeDeck(isNext: false, isSeachLocalArea: false);
                StrategyTopTaskManager.Instance.UIModel.Character.ChangeCharacter(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck);
            }
            UIRebellionOrgaizeShipBanner[] shipStates = ShipStates;
            foreach (UIRebellionOrgaizeShipBanner uIRebellionOrgaizeShipBanner in shipStates)
            {
                uIRebellionOrgaizeShipBanner.UnsetFocus();
            }
            FocusBanner = null;
        }
        public void SetCustomMode()
        {
            this.dialogKeyController       = App.OnlyController;
            this.dialogKeyController.IsRun = false;
            this.BauxiSuccess.get_transform().localPositionX(1000f);
            this.BauxiField.get_transform().localPositionX(1000f);
            this.key             = new KeyControl(0, 5, 0.4f, 0.1f);
            this.key.isLoopIndex = false;
            this.key.setChangeValue(-2f, 1f, 2f, -1f);
            App.OnlyController = this.key;
            this.BauxiSuccess.get_transform().get_parent().SetActive(true);
            this.ModeProcessor = base.GetComponent <ModeProcessor>();
            this.ModeProcessor.addMode("Top", new ModeProc.Mode.ModeRun(this.TopModeRun), new ModeProc.Mode.ModeChange(this.TopModeEnter), new ModeProc.Mode.ModeChange(this.TopModeExit));
            this.ModeProcessor.addMode("SupplyConfirm", new ModeProc.Mode.ModeRun(this.SupplyConfirmModeRun), new ModeProc.Mode.ModeChange(this.SupplyConfirmModeEnter), new ModeProc.Mode.ModeChange(this.SupplyConfirmModeExit));
            this.ModeProcessor.addMode("RepairConfirm", new ModeProc.Mode.ModeRun(this.RepairConfirmModeRun), new ModeProc.Mode.ModeChange(this.RepairConfirmModeEnter), new ModeProc.Mode.ModeChange(this.RepairConfirmModeExit));
            this.ModeProcessor.addMode("RepairKitConfirm", new ModeProc.Mode.ModeRun(this.RepairKitConfirmModeRun), new ModeProc.Mode.ModeChange(this.RepairKitConfirmModeEnter), new ModeProc.Mode.ModeChange(this.RepairKitConfirmModeExit));
            this.ModeProcessor.addMode("OrganizeDetail", new ModeProc.Mode.ModeRun(this.OrganizeDetailModeRun), new ModeProc.Mode.ModeChange(this.OrganizeDetailModeEnter), new ModeProc.Mode.ModeChange(this.OrganizeDetailModeExit));
            this.ModeProcessor.addMode("OrganizeList", new ModeProc.Mode.ModeRun(this.OrganizeListModeRun), new ModeProc.Mode.ModeChange(this.OrganizeListModeEnter), new ModeProc.Mode.ModeChange(this.OrganizeListModeExit));
            this.ModeProcessor.addMode("OrganizeListDetail", new ModeProc.Mode.ModeRun(this.OrganizeListDetailModeRun), new ModeProc.Mode.ModeChange(this.OrganizeListDetailModeEnter), new ModeProc.Mode.ModeChange(this.OrganizeListDetailModeExit));
            this.FocusBanner = this.ShipStates[0];
            UIRebellionOrgaizeShipBanner[] shipStates = this.ShipStates;
            for (int i = 0; i < shipStates.Length; i++)
            {
                UIRebellionOrgaizeShipBanner uIRebellionOrgaizeShipBanner = shipStates[i];
                uIRebellionOrgaizeShipBanner.SetOnClick(new Action <int>(this.OnClickBanner));
            }
            this.BannerFocusAnim(true);
            this.OrganizeMng = new OrganizeManager(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck.AreaId);
            StrategyTopTaskManager.Instance.setActiveStrategy(false);
            SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsInputEnable = false;
            SingletonMonoBehaviour <Live2DModel> .Instance.Disable();

            this.ListParent.SetBackButtonEnable(false);
            StrategyTopTaskManager.Instance.UIModel.HowToStrategy.isForceShow();
            this.isInitialize = false;
        }