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);
        }
Exemplo n.º 3
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();
 }
Exemplo n.º 5
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();
 }
Exemplo n.º 6
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;
 }