Esempio n. 1
0
        private bool keyControllerHandler()
        {
            TaskMainArsenalManager.NowMode = this.CurrentMode;
            switch (this.CurrentMode)
            {
            case TaskMainArsenalManager.Mode.MENU_FOCUS:
                return(this.keyControllerMenuFocus());

            case TaskMainArsenalManager.Mode.DOCK_FOCUS:
                return(this.keyControllerDockFocus());

            case TaskMainArsenalManager.Mode.KENZOU_DIALOG:
                return(this.keyControllerKenzouDialog());

            case TaskMainArsenalManager.Mode.KAIHATSU_DIALOG:
                return(this.keyControllerKaihatsuDialog());

            case TaskMainArsenalManager.Mode.KAITAI_HAIKI_DIALOG:
                return(this.keyControllerKaitaiHaikiDialog());

            case TaskMainArsenalManager.Mode.HIGHSPEED_DIALOG:
                return(this.keyControllerHighspeedDialog());

            case TaskMainArsenalManager.Mode.DOCKOPEN_DIALOG:
                return(this.keyControllerDockOpenDialog());

            default:
                return(false);
            }
        }
Esempio n. 2
0
        public bool selectedKenzou()
        {
            bool flag = false;

            for (int i = 0; i < 4; i++)
            {
                if (TaskMainArsenalManager.dockMamager[i].CheckStateEmpty())
                {
                    this.DockIndex = i;
                    flag           = true;
                    break;
                }
            }
            if (flag)
            {
                this.CurrentMode = TaskMainArsenalManager.Mode.KENZOU_DIALOG;
                for (int j = 0; j < 4; j++)
                {
                    TaskMainArsenalManager.dockMamager[j].DisableParticles();
                }
                TaskMainArsenalManager.dockMamager[this.DockIndex].setConstruct();
                return(false);
            }
            SoundUtils.PlaySE(SEFIleInfos.CommonCancel2);
            CommonPopupDialog.Instance.StartPopup(Util.getPopupMessage(PopupMess.CannotArsenalByFullDeck));
            return(true);
        }
Esempio n. 3
0
 public void hideDockOpenDialog()
 {
     ArsenalTaskManager._clsArsenal.setTutorialVisible(true);
     this.CurrentMode = ((!this.isDockSelect) ? TaskMainArsenalManager.Mode.MENU_FOCUS : TaskMainArsenalManager.Mode.DOCK_FOCUS);
     for (int i = 0; i < 4; i++)
     {
         TaskMainArsenalManager.dockMamager[i].EnableParticles();
     }
 }
Esempio n. 4
0
 public void showDockOpenDialog()
 {
     ArsenalTaskManager._clsArsenal.setTutorialVisible(false);
     this.CurrentMode = TaskMainArsenalManager.Mode.DOCKOPEN_DIALOG;
     for (int i = 0; i < 4; i++)
     {
         TaskMainArsenalManager.dockMamager[i].DisableParticles();
     }
 }
Esempio n. 5
0
 public bool selectedKaitaiHaiki()
 {
     this.CurrentMode = TaskMainArsenalManager.Mode.KAITAI_HAIKI_DIALOG;
     for (int i = 0; i < 4; i++)
     {
         TaskMainArsenalManager.dockMamager[i].DisableParticles();
     }
     return(false);
 }
Esempio n. 6
0
 public void showHighSpeedDialog(int dockNum)
 {
     this.CurrentMode = TaskMainArsenalManager.Mode.HIGHSPEED_DIALOG;
     for (int i = 0; i < 4; i++)
     {
         TaskMainArsenalManager.dockMamager[i].DisableParticles();
     }
     this._speedDialogManager.showHighSpeedDialog(dockNum);
     ArsenalTaskManager._clsArsenal.setTutorialVisible(false);
 }
Esempio n. 7
0
 public bool selectedKaihatsu()
 {
     this.CurrentMode = TaskMainArsenalManager.Mode.KAIHATSU_DIALOG;
     for (int i = 0; i < 4; i++)
     {
         TaskMainArsenalManager.dockMamager[i].DisableParticles();
     }
     TaskMainArsenalManager.dockMamager[this.DockIndex].setConstruct();
     return(false);
 }
Esempio n. 8
0
 public bool hideDialog()
 {
     this.CurrentMode = ((!this.isDockSelect) ? TaskMainArsenalManager.Mode.MENU_FOCUS : TaskMainArsenalManager.Mode.DOCK_FOCUS);
     this._hexMenu.AllButtonEnable(true);
     for (int i = 0; i < 4; i++)
     {
         TaskMainArsenalManager.dockMamager[i].EnableParticles();
     }
     return(true);
 }
Esempio n. 9
0
 private bool unFocusDock()
 {
     this.CurrentMode = TaskMainArsenalManager.Mode.MENU_FOCUS;
     for (int i = 0; i < 4; i++)
     {
         TaskMainArsenalManager.dockMamager[i].EnableParticles();
     }
     this.isDockSelect    = false;
     this.dockSelectIndex = -1;
     this.updateDockSelect();
     return(true);
 }
Esempio n. 10
0
 public bool focusDock()
 {
     this.CurrentMode = TaskMainArsenalManager.Mode.DOCK_FOCUS;
     for (int i = 0; i < 4; i++)
     {
         TaskMainArsenalManager.dockMamager[i].EnableParticles();
     }
     this.isDockSelect    = true;
     this.dockSelectIndex = 0;
     this.updateDockSelect();
     return(true);
 }
Esempio n. 11
0
 private bool keyControllerKaitaiHaikiDialog()
 {
     if (this.KeyController.keyState.get_Item(0).down)
     {
         this.CurrentMode = ((!this.isDockSelect) ? TaskMainArsenalManager.Mode.MENU_FOCUS : TaskMainArsenalManager.Mode.DOCK_FOCUS);
         for (int i = 0; i < 4; i++)
         {
             TaskMainArsenalManager.dockMamager[i].EnableParticles();
         }
     }
     return(true);
 }
Esempio n. 12
0
 public void hideHighSpeedDialog()
 {
     this.CurrentMode = ((!this.isDockSelect) ? TaskMainArsenalManager.Mode.MENU_FOCUS : TaskMainArsenalManager.Mode.DOCK_FOCUS);
     for (int i = 0; i < 4; i++)
     {
         TaskMainArsenalManager.dockMamager[i].EnableParticles();
     }
     this._speedDialogManager.hideHighSpeedDialog();
     for (int j = 0; j < 4; j++)
     {
         if (TaskMainArsenalManager.dockMamager[j].IsShowHigh)
         {
             TaskMainArsenalManager.dockMamager[j].updateSpeedUpIcon();
             TaskMainArsenalManager.dockMamager[j].IsShowHigh = false;
             break;
         }
         TaskMainArsenalManager.dockMamager[j].setSelect(this.DockIndex == j);
     }
     ArsenalTaskManager._clsArsenal.setTutorialVisible(true);
     SoundUtils.PlaySE(SEFIleInfos.CommonCancel1);
 }
Esempio n. 13
0
        protected override bool Init()
        {
            if (!this._isCreate)
            {
                TaskMainArsenalManager.IsControl = true;
                this._isEnd        = false;
                this.isDockSelect  = false;
                this.CurrentMode   = TaskMainArsenalManager.Mode.MENU_FOCUS;
                this.KeyController = ArsenalTaskManager.GetKeyControl();
                TaskMainArsenalManager.arsenalManager = ArsenalTaskManager.GetLogicManager();
                TaskMainArsenalManager.dockMamager    = new UiArsenalDock[4];
                this._dock = TaskMainArsenalManager.arsenalManager.GetDocks();
                TaskMainArsenalManager._MainObj = base.scenePrefab.get_gameObject();
                this._bgObj = base.get_transform().get_parent().get_parent().get_transform().FindChild("BackGroundPanel").get_gameObject();
                if (this._hexMenu == null)
                {
                    this._hexMenu = this._bgObj.get_transform().FindChild("HexMenu").GetComponent <ArsenalHexMenu>();
                }
                if (this._speedDialogManager == null)
                {
                    this._speedDialogManager = GameObject.Find("TaskArsenalMain/HighSpeedPanel").GetComponent <UiArsenalSpeedDialog>();
                }
                if (this._dockOpenDialogManager == null)
                {
                    this._dockOpenDialogManager = GameObject.Find("TaskArsenalMain/DockOpenDialog").GetComponent <UiArsenalDockOpenDialog>();
                }
                if (this._tankerDialog == null)
                {
                    this._tankerDialog = this.commonDialog.dialogMessages[0].GetComponent <ArsenalTankerDialog>();
                }
                TaskMainArsenalManager.uiCamera = GameObject.Find("Arsenal Root/Camera").GetComponent <UICamera>();
                this._hexMenu.Init();
                this._speedDialogManager.init();
                this._dockOpenDialogManager.init();
                int numOfKeyPossessions = TaskMainArsenalManager.arsenalManager.NumOfKeyPossessions;
                for (int i = 0; i < 4; i++)
                {
                    TaskMainArsenalManager.dockMamager[i] = this._bgObj.get_transform().FindChild("Dock" + (i + 1)).SafeGetComponent <UiArsenalDock>();
                    TaskMainArsenalManager.dockMamager[i].init(this, i);
                    TaskMainArsenalManager.dockMamager[i].EnableParticles();
                    if (this._dock.Length > i)
                    {
                        TaskMainArsenalManager.dockMamager[i]._setShow();
                        TaskMainArsenalManager.dockMamager[i].HideKeyLock();
                    }
                }
                for (int j = 0; j < 4; j++)
                {
                    if (!TaskMainArsenalManager.dockMamager[j].SelectDockMode())
                    {
                        TaskMainArsenalManager.dockMamager[j].ShowKeyLock();
                        break;
                    }
                }
                Animation component = this._bgObj.GetComponent <Animation>();
                component.Stop();
                component.Play();
                if (SingletonMonoBehaviour <PortObjectManager> .exist())
                {
                    SoundUtils.SwitchBGM(BGMFileInfos.PortTools);
                    SingletonMonoBehaviour <PortObjectManager> .Instance.PortTransition.EndTransition(delegate
                    {
                        this.isCreated();
                    }, true, true);
                }
                else
                {
                    this.isCreated();
                }
            }
            else if (!this.isDockSelect)
            {
                this._hexMenu.UpdateButtonForcus();
            }
            if (Enumerable.Any <BuildDockModel>(this._dock, (BuildDockModel x) => x.Ship != null && x.CompleteTurn != 0))
            {
                SingletonMonoBehaviour <TutorialGuideManager> .Instance.CheckAndShowFirstTutorial(ArsenalTaskManager.GetLogicManager().UserInfo.Tutorial, TutorialGuideManager.TutorialID.SpeedBuild, null);
            }
            TutorialModel tutorial = TaskMainArsenalManager.arsenalManager.UserInfo.Tutorial;

            if (tutorial.GetStep() == 2 && !tutorial.GetStepTutorialFlg(3) && this.Tutorial == null)
            {
                this.Tutorial = Util.InstantiatePrefab("TutorialGuide/TutorialGuide3_3", base.get_gameObject(), false);
                this.DelayActionFrame(2, delegate
                {
                    this.setTutorialCat();
                });
            }
            this.setTutorialVisible(true);
            TaskMainArsenalManager.IsControl = true;
            return(true);
        }