Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
0
 public void Initialize(IOrganizeManager manager, Camera camera)
 {
     if (!mFirstCalledInitialize)
     {
         SortButton.SetSortKey(SortKey.UNORGANIZED);
         mFirstCalledInitialize = true;
     }
     _isFirst      = true;
     _before_focus = 0;
     SetSwipeEventCamera(camera);
     OrganizeScrollListChild[] mViews = base.mViews;
     foreach (OrganizeScrollListChild organizeScrollListChild in mViews)
     {
         organizeScrollListChild.setManager(manager);
     }
     SortButton.InitializeForOrganize(manager.GetShipList());
     SortButton.SetClickable(clickable: true);
     SortButton.SetOnSortedShipsListener(OnSorted);
     SortButton.SetCheckClicableDelegate(CheckSortButtonClickable);
     SortButton.ReSort();
     base.gameObject.SetActive(false);
     base.gameObject.SetActive(true);
 }
 public void Initialize(IOrganizeManager manager, Camera camera)
 {
     if (!this.mFirstCalledInitialize)
     {
         this.SortButton.SetSortKey(SortKey.UNORGANIZED);
         this.mFirstCalledInitialize = true;
     }
     this._isFirst      = true;
     this._before_focus = 0;
     base.SetSwipeEventCamera(camera);
     OrganizeScrollListChild[] mViews = this.mViews;
     for (int i = 0; i < mViews.Length; i++)
     {
         OrganizeScrollListChild organizeScrollListChild = mViews[i];
         organizeScrollListChild.setManager(manager);
     }
     this.SortButton.InitializeForOrganize(manager.GetShipList());
     this.SortButton.SetClickable(true);
     this.SortButton.SetOnSortedShipsListener(new Action <ShipModel[]>(this.OnSorted));
     this.SortButton.SetCheckClicableDelegate(new UIShipSortButton.CheckClickable(this.CheckSortButtonClickable));
     this.SortButton.ReSort();
     base.get_gameObject().SetActive(false);
     base.get_gameObject().SetActive(true);
 }