Пример #1
0
 protected override bool Run()
 {
     if (!isInit)
     {
         Init();
         isInit = true;
     }
     Main.Update();
     if (isEnd)
     {
         if (TaskOrganizeTop.changeState == "detail")
         {
             EscortOrganizeTaskManager.ReqPhase(OrganizeTaskManager.OrganizePhase.Detail);
         }
         else if (TaskOrganizeTop.changeState == "list")
         {
             EscortOrganizeTaskManager.ReqPhase(OrganizeTaskManager.OrganizePhase.List);
         }
         isEnd = false;
         return(false);
     }
     if (!base.isControl)
     {
         return(true);
     }
     if (TaskOrganizeTop.controlState != null && StateControllerDic.ContainsKey(TaskOrganizeTop.controlState))
     {
         return(StateControllerDic[TaskOrganizeTop.controlState]());
     }
     return(true);
 }
 public new void ChangeButtonEL(GameObject obj)
 {
     if (!isEnd)
     {
         int        bannerIndex = TaskOrganizeTop.BannerIndex;
         int        memId       = ship.MemId;
         List <int> list        = new List <int>();
         list.Add(memId);
         List <int>  list2 = list;
         ShipModel[] ships = OrganizeTaskManager.Instance.GetTopTask().currentDeck.GetShips();
         if (bannerIndex - 1 < ships.Length)
         {
             list2.Add(ships[bannerIndex - 1].MemId);
         }
         if (!EscortOrganizeTaskManager.GetEscortManager().ChangeOrganize(OrganizeTaskManager.Instance.GetTopTask().GetDeckID(), bannerIndex - 1, memId))
         {
             Debug.Log("EROOR: ChangeOrganize");
             return;
         }
         detailManager.Close();
         SoundUtils.PlaySE(SEFIleInfos.SE_003);
         EscortOrganizeTaskManager._clsList.BackListEL(null, isForce: true);
         EscortOrganizeTaskManager._clsTop.UpdateAllBannerByChangeShip();
         OrganizeTaskManager.Instance.GetListTask().UpdateList();
         ShipUtils.PlayShipVoice(ship, 13);
         setChangePhase("top");
     }
 }
        public bool FirstInit()
        {
            if (!this.IsCreate)
            {
                TaskOrganizeTop.KeyController       = OrganizeTaskManager.GetKeyControl();
                TaskOrganizeTop.KeyController.IsRun = false;
                SingletonMonoBehaviour <UIShortCutMenu> .Instance.LockTouchControl(true);

                this.logicManager     = OrganizeTaskManager.Instance.GetLogicManager();
                TaskOrganizeTop.decks = new EscortDeckModel[]
                {
                    OrganizeTaskManager.Instance.GetLogicManager().MapArea.GetEscortDeck()
                };
                ShipModel[] ships = TaskOrganizeTop.decks[0].GetShips();
                TaskOrganizeTop.allShip     = this.logicManager.GetShipList();
                TaskOrganizeTop.BannerIndex = 1;
                TaskOrganizeTop.SystemIndex = 0;
                base.isControl = true;
                EscortOrganizeTaskManager._clsTop.setControlState();
                this._bannerManager = new OrganizeBannerManager[6];
                for (int i = 0; i < 6; i++)
                {
                    Util.FindParentToChild <OrganizeBannerManager>(ref this._bannerManager[i], this._bannerPanel.get_transform(), "ShipSlot" + (i + 1));
                    this._bannerManager[i].init(i + 1, new Predicate <OrganizeBannerManager>(this.OnCheckDragDropTarget), new Action <OrganizeBannerManager>(this.OnDragDropStart), new Predicate <OrganizeBannerManager>(this.OnDragDropRelease), new Action(this.OnDragDropEnd), false);
                    if (ships.Length > i)
                    {
                        this._bannerManager[i].setBanner(ships[i], true, null, true);
                    }
                    this._bannerManager[i].UpdateBanner(false);
                }
                this._bannerManager[0].UpdateBanner(true);
                this.DelayAction(0.3f, delegate
                {
                    TaskOrganizeTop.KeyController.IsRun = true;
                    SingletonMonoBehaviour <UIShortCutMenu> .Instance.LockTouchControl(false);
                });
                Transform parent = this._bgPanel.get_transform().FindChild("SideButtons");
                Util.FindParentToChild <UIButton>(ref this._allUnsetBtn, parent, "AllUnsetBtn");
                Util.FindParentToChild <UIButton>(ref this._tenderBtn, parent, "TenderBtn");
                Util.FindParentToChild <UIButton>(ref this._fleetNameBtn, parent, "DeckNameBtn");
                base.currentDeck = EscortOrganizeTaskManager.GetEscortManager().EditDeck;
                base.UpdateSystemButtons();
                base.isControl = false;
                TutorialModel tutorial = StrategyTopTaskManager.GetLogicManager().UserInfo.Tutorial;
                if (!SingletonMonoBehaviour <TutorialGuideManager> .Instance.CheckAndShowFirstTutorial(tutorial, TutorialGuideManager.TutorialID.EscortOrganize, null, delegate
                {
                    this.IsCreate = true;
                    base.isControl = true;
                }))
                {
                    base.isControl = true;
                    this.IsCreate  = true;
                }
            }
            return(true);
        }
Пример #4
0
        public new bool FirstInit()
        {
            if (!IsCreate)
            {
                TaskOrganizeTop.KeyController       = OrganizeTaskManager.GetKeyControl();
                TaskOrganizeTop.KeyController.IsRun = false;
                SingletonMonoBehaviour <UIShortCutMenu> .Instance.LockTouchControl(isEnable : true);

                logicManager          = OrganizeTaskManager.Instance.GetLogicManager();
                TaskOrganizeTop.decks = new EscortDeckModel[1]
                {
                    OrganizeTaskManager.Instance.GetLogicManager().MapArea.GetEscortDeck()
                };
                ShipModel[] ships = TaskOrganizeTop.decks[0].GetShips();
                TaskOrganizeTop.allShip     = logicManager.GetShipList();
                TaskOrganizeTop.BannerIndex = 1;
                TaskOrganizeTop.SystemIndex = 0;
                base.isControl = true;
                EscortOrganizeTaskManager._clsTop.setControlState();
                _bannerManager = new OrganizeBannerManager[6];
                for (int i = 0; i < 6; i++)
                {
                    Util.FindParentToChild(ref _bannerManager[i], _bannerPanel.transform, "ShipSlot" + (i + 1));
                    _bannerManager[i].init(i + 1, OnCheckDragDropTarget, OnDragDropStart, OnDragDropRelease, OnDragDropEnd, isInitPos: false);
                    if (ships.Length > i)
                    {
                        _bannerManager[i].setBanner(ships[i], openAnimation: true, null, isShutterHide: true);
                    }
                    _bannerManager[i].UpdateBanner(enabled: false);
                }
                _bannerManager[0].UpdateBanner(enabled: true);
                this.DelayAction(0.3f, delegate
                {
                    TaskOrganizeTop.KeyController.IsRun = true;
                    SingletonMonoBehaviour <UIShortCutMenu> .Instance.LockTouchControl(isEnable: false);
                });
                Transform parent = _bgPanel.transform.FindChild("SideButtons");
                Util.FindParentToChild(ref _allUnsetBtn, parent, "AllUnsetBtn");
                Util.FindParentToChild(ref _tenderBtn, parent, "TenderBtn");
                Util.FindParentToChild(ref _fleetNameBtn, parent, "DeckNameBtn");
                base.currentDeck = EscortOrganizeTaskManager.GetEscortManager().EditDeck;
                UpdateSystemButtons();
                base.isControl = false;
                TutorialModel tutorial = StrategyTopTaskManager.GetLogicManager().UserInfo.Tutorial;
                if (!SingletonMonoBehaviour <TutorialGuideManager> .Instance.CheckAndShowFirstTutorial(tutorial, TutorialGuideManager.TutorialID.EscortOrganize, null, delegate
                {
                    IsCreate = true;
                    base.isControl = true;
                }))
                {
                    base.isControl = true;
                    IsCreate       = true;
                }
            }
            return(true);
        }
 private void Start()
 {
     this.StateControllerDic = new Dictionary <string, TaskOrganizeTop.StateController>();
     this.StateControllerDic.Add("banner", new TaskOrganizeTop.StateController(this.StateKeyControl_Banner));
     this.StateControllerDic.Add("system", new TaskOrganizeTop.StateController(this.StateKeyControl_System));
     this.StateControllerDic.Add("tender", new TaskOrganizeTop.StateController(base.StateKeyControl_Tender));
     base.currentDeck = EscortOrganizeTaskManager.GetEscortManager().EditDeck;
     this.StartRefGet();
     this._fleetNameLabel.text            = ((EscortDeckModel)base.currentDeck).Name;
     this._fleetNameLabel.supportEncoding = false;
     this.mEditName = ((EscortDeckModel)base.currentDeck).Name;
     Ime.add_OnGotIMEDialogResult(new Messages.EventHandler(base.OnGotIMEDialogResult));
     Main.Initialise();
 }
Пример #6
0
 private new void Start()
 {
     StateControllerDic = new Dictionary <string, StateController>();
     StateControllerDic.Add("banner", StateKeyControl_Banner);
     StateControllerDic.Add("system", StateKeyControl_System);
     StateControllerDic.Add("tender", base.StateKeyControl_Tender);
     base.currentDeck = EscortOrganizeTaskManager.GetEscortManager().EditDeck;
     StartRefGet();
     _fleetNameLabel.text            = ((EscortDeckModel)base.currentDeck).Name;
     _fleetNameLabel.supportEncoding = false;
     mEditName = ((EscortDeckModel)base.currentDeck).Name;
     Ime.OnGotIMEDialogResult += base.OnGotIMEDialogResult;
     Main.Initialise();
 }
 protected override bool Run()
 {
     if (isEnd)
     {
         if (changeState == "list")
         {
             EscortOrganizeTaskManager.ReqPhase(OrganizeTaskManager.OrganizePhase.List);
         }
         else if (changeState == "top")
         {
             EscortOrganizeTaskManager.ReqPhase(OrganizeTaskManager.OrganizePhase.Phase_ST);
         }
         return(false);
     }
     if (TaskOrganizeListDetail.KeyController.IsLeftDown())
     {
         if (!ship.IsLocked())
         {
             detailManager.buttons.LockSwitch.MoveLockBtn();
         }
     }
     else if (TaskOrganizeListDetail.KeyController.IsRightDown())
     {
         if (ship.IsLocked())
         {
             detailManager.buttons.LockSwitch.MoveLockBtn();
         }
     }
     else if (TaskOrganizeListDetail.KeyController.IsShikakuDown())
     {
         detailManager.buttons.LockSwitch.MoveLockBtn();
     }
     else if (TaskOrganizeListDetail.KeyController.IsMaruDown())
     {
         if (!isEnd)
         {
             ChangeButtonEL(null);
         }
     }
     else if (TaskOrganizeListDetail.KeyController.IsBatuDown())
     {
         BackDataEL(null);
     }
     else if (TaskOrganizeListDetail.KeyController.IsRDown())
     {
         SingletonMonoBehaviour <PortObjectManager> .Instance.BackToPortOrOrganize();
     }
     return(true);
 }
 protected override bool Run()
 {
     if (!this.isInit)
     {
         this.Init();
         this.isInit = true;
     }
     Main.Update();
     if (this.isEnd)
     {
         if (TaskOrganizeTop.changeState == "detail")
         {
             EscortOrganizeTaskManager.ReqPhase(OrganizeTaskManager.OrganizePhase.Detail);
         }
         else if (TaskOrganizeTop.changeState == "list")
         {
             EscortOrganizeTaskManager.ReqPhase(OrganizeTaskManager.OrganizePhase.List);
         }
         this.isEnd = false;
         return(false);
     }
     return(!base.isControl || TaskOrganizeTop.controlState == null || !this.StateControllerDic.ContainsKey(TaskOrganizeTop.controlState) || this.StateControllerDic.get_Item(TaskOrganizeTop.controlState)());
 }
 protected override bool Run()
 {
     isShowFrame = false;
     if (isEnd)
     {
         if (changeState == "listDetail")
         {
             EscortOrganizeTaskManager.ReqPhase(OrganizeTaskManager.OrganizePhase.ListDetail);
         }
         else if (changeState == "detail")
         {
             EscortOrganizeTaskManager.ReqPhase(OrganizeTaskManager.OrganizePhase.Detail);
         }
         else if (changeState == "top")
         {
             EscortOrganizeTaskManager.ReqPhase(OrganizeTaskManager.OrganizePhase.Phase_ST);
         }
         isEnd = false;
         Debug.Log("deff");
         return(false);
     }
     TaskOrganizeList.KeyController.Update();
     if (!TaskOrganizeList.KeyController.IsShikakuDown())
     {
         if (TaskOrganizeList.KeyController.IsBatuDown())
         {
             changeState = "top";
             isEnd       = true;
             BackListEL(null);
         }
         else if (TaskOrganizeList.KeyController.IsRDown())
         {
             SingletonMonoBehaviour <PortObjectManager> .Instance.BackToPortOrOrganize();
         }
     }
     return(true);
 }
Пример #10
0
 protected override bool Run()
 {
     if (this.isEnd)
     {
         if (this.changeState == "top")
         {
             EscortOrganizeTaskManager.ReqPhase(OrganizeTaskManager.OrganizePhase.Phase_ST);
         }
         else if (this.changeState == "list")
         {
             EscortOrganizeTaskManager.ReqPhase(OrganizeTaskManager.OrganizePhase.List);
         }
         return(false);
     }
     if (TaskOrganizeDetail.KeyController.IsLeftDown())
     {
         this.detailManager.buttons.UpdateButton(true, null);
     }
     else if (TaskOrganizeDetail.KeyController.IsRightDown())
     {
         this.detailManager.buttons.UpdateButton(false, null);
     }
     else if (TaskOrganizeDetail.KeyController.IsMaruDown())
     {
         this.detailManager.buttons.Decide();
     }
     else if (TaskOrganizeDetail.KeyController.IsBatuDown())
     {
         this.BackMaskEL(null);
     }
     else if (TaskOrganizeDetail.KeyController.IsRDown())
     {
         SingletonMonoBehaviour <PortObjectManager> .Instance.BackToPortOrOrganize();
     }
     return(true);
 }
Пример #11
0
 public void Show(ShipModel ship)
 {
     this.ship        = ship;
     this.changeState = string.Empty;
     this.detailManager.SetDetailPanel(this.ship, true, OrganizeTaskManager.Instance.GetTopTask().GetDeckID(), EscortOrganizeTaskManager.GetEscortManager(), TaskOrganizeTop.BannerIndex - 1, null);
     this.detailManager.Open();
     this.isEnd = false;
 }
 public override void Show(ShipModel ship)
 {
     base.ship = ship;
     index     = 0;
     isControl = true;
     detailManager.SetDetailPanel(ship, isFirstDitail: false, OrganizeTaskManager.Instance.GetTopTask().GetDeckID(), EscortOrganizeTaskManager.GetEscortManager(), TaskOrganizeTop.BannerIndex - 1, null);
     detailManager.Open();
 }
 public override void Show(ShipModel ship)
 {
     this.ship      = ship;
     this.index     = 0;
     this.isControl = true;
     this.detailManager.SetDetailPanel(ship, false, OrganizeTaskManager.Instance.GetTopTask().GetDeckID(), EscortOrganizeTaskManager.GetEscortManager(), TaskOrganizeTop.BannerIndex - 1, null);
     this.detailManager.Open();
 }
 public new void Show(ShipModel ship)
 {
     base.ship   = ship;
     changeState = string.Empty;
     detailManager.SetDetailPanel(base.ship, isFirstDitail: true, OrganizeTaskManager.Instance.GetTopTask().GetDeckID(), EscortOrganizeTaskManager.GetEscortManager(), TaskOrganizeTop.BannerIndex - 1, null);
     detailManager.Open();
     isEnd = false;
 }