Beispiel #1
0
 protected virtual void Awake()
 {
     _clsInputKey = new KeyControl();
     _clsInputKey.useDoubleIndex(0, 3);
     dialogPopUp = new BaseDialogPopup();
     Instance    = this;
 }
 protected override bool Run()
 {
     isShowFrame = false;
     if (isEnd)
     {
         if (changeState == "listDetail")
         {
             OrganizeTaskManager.Instance.GetTopTask()._state2 = TaskOrganizeTop.OrganizeState.DetailList;
             OrganizeTaskManager.ReqPhase(OrganizeTaskManager.OrganizePhase.ListDetail);
         }
         else if (changeState == "detail")
         {
             OrganizeTaskManager.ReqPhase(OrganizeTaskManager.OrganizePhase.Detail);
         }
         else if (changeState == "top")
         {
             OrganizeTaskManager.Instance.GetTopTask()._state2 = TaskOrganizeTop.OrganizeState.Top;
             OrganizeTaskManager.ReqPhase(OrganizeTaskManager.OrganizePhase.Phase_ST);
         }
         isEnd = false;
         return(false);
     }
     if (Input.touchCount == 0)
     {
         KeyController.Update();
     }
     if (KeyController.IsRDown())
     {
         SingletonMonoBehaviour <PortObjectManager> .Instance.BackToStrategy();
     }
     return(true);
 }
Beispiel #3
0
 public void Hide()
 {
     _mainBg.gameObject.SafeGetTweenAlpha(0.6f, 0f, 0.5f, 0f, UITweener.Method.Linear, UITweener.Style.Once, base.gameObject, "compHideAnimation");
     _tenderPanel.gameObject.SafeGetTweenAlpha(1f, 0f, 0.5f, 0f, UITweener.Method.Linear, UITweener.Style.Once, _tenderPanel.gameObject, string.Empty);
     OrganizeTaskManager.GetDialogPopUp().Close(_tenderPanel.gameObject, 1f, 1f, 0f, 0f);
     State = TenderState.None;
 }
Beispiel #4
0
 protected override bool Init()
 {
     TaskOrganizeDetail.KeyController = OrganizeTaskManager.GetKeyControl();
     this.detailManager.Open();
     this.isEnd = false;
     return(true);
 }
Beispiel #5
0
 public void HideTwinOther()
 {
     _twinPanel.gameObject.SafeGetTweenAlpha(1f, 0f, 0.5f, 0f, UITweener.Method.Linear, UITweener.Style.Once, _twinPanel.gameObject, string.Empty);
     _otherBg.gameObject.SafeGetTweenAlpha(0.6f, 0f, 0.5f, 0f, UITweener.Method.Linear, UITweener.Style.Once, _otherBg.gameObject, string.Empty);
     OrganizeTaskManager.GetDialogPopUp().Close(_twinPanel.gameObject, 1f, 1f, 0f, 0f);
     State = TenderState.Select;
 }
Beispiel #6
0
        public void ShowTwinOther()
        {
            _twinPanel.transform.localPosition = Vector3.zero;
            _otherBg.transform.localPosition   = Vector3.zero;
            _twinPanel.gameObject.SafeGetTweenAlpha(0f, 1f, 0.5f, 0f, UITweener.Method.Linear, UITweener.Style.Once, _twinPanel.gameObject, string.Empty);
            _otherBg.gameObject.SafeGetTweenAlpha(0f, 0.6f, 0.5f, 0f, UITweener.Method.Linear, UITweener.Style.Once, _otherBg.gameObject, string.Empty);
            OrganizeTaskManager.GetDialogPopUp().Open(_twinPanel.gameObject, 0f, 0f, 1f, 1f);
            int num      = Random.Range(0, 2);
            int voiceNum = -1;

            switch (num)
            {
            case 0:
                voiceNum = 15;
                break;

            case 1:
                voiceNum = 16;
                break;
            }
            ShipUtils.PlayPortVoice(voiceNum);
            setIndex2 = 0;
            State     = TenderState.Twin;
            setTwinUseDialog();
            updateTwinBtn();
        }
 public void Hide()
 {
     this._mainBg.get_gameObject().SafeGetTweenAlpha(0.6f, 0f, 0.5f, 0f, UITweener.Method.Linear, UITweener.Style.Once, base.get_gameObject(), "compHideAnimation");
     this._tenderPanel.get_gameObject().SafeGetTweenAlpha(1f, 0f, 0.5f, 0f, UITweener.Method.Linear, UITweener.Style.Once, this._tenderPanel.get_gameObject(), string.Empty);
     OrganizeTaskManager.GetDialogPopUp().Close(this._tenderPanel.get_gameObject(), 1f, 1f, 0f, 0f);
     this.State = OrganizeTender.TenderState.None;
 }
        public void ShowTwinOther()
        {
            this._twinPanel.get_transform().set_localPosition(Vector3.get_zero());
            this._otherBg.get_transform().set_localPosition(Vector3.get_zero());
            this._twinPanel.get_gameObject().SafeGetTweenAlpha(0f, 1f, 0.5f, 0f, UITweener.Method.Linear, UITweener.Style.Once, this._twinPanel.get_gameObject(), string.Empty);
            this._otherBg.get_gameObject().SafeGetTweenAlpha(0f, 0.6f, 0.5f, 0f, UITweener.Method.Linear, UITweener.Style.Once, this._otherBg.get_gameObject(), string.Empty);
            OrganizeTaskManager.GetDialogPopUp().Open(this._twinPanel.get_gameObject(), 0f, 0f, 1f, 1f);
            int num      = Random.Range(0, 2);
            int voiceNum = -1;
            int num2     = num;

            if (num2 != 0)
            {
                if (num2 == 1)
                {
                    voiceNum = 16;
                }
            }
            else
            {
                voiceNum = 15;
            }
            ShipUtils.PlayPortVoice(voiceNum);
            this.setIndex2 = 0;
            this.State     = OrganizeTender.TenderState.Twin;
            this.setTwinUseDialog();
            this.updateTwinBtn();
        }
 public void HideTwinOther()
 {
     this._twinPanel.get_gameObject().SafeGetTweenAlpha(1f, 0f, 0.5f, 0f, UITweener.Method.Linear, UITweener.Style.Once, this._twinPanel.get_gameObject(), string.Empty);
     this._otherBg.get_gameObject().SafeGetTweenAlpha(0.6f, 0f, 0.5f, 0f, UITweener.Method.Linear, UITweener.Style.Once, this._otherBg.get_gameObject(), string.Empty);
     OrganizeTaskManager.GetDialogPopUp().Close(this._twinPanel.get_gameObject(), 1f, 1f, 0f, 0f);
     this.State = OrganizeTender.TenderState.Select;
 }
Beispiel #10
0
 protected virtual void Awake()
 {
     OrganizeTaskManager._clsInputKey = new KeyControl(0, 0, 0.4f, 0.1f);
     OrganizeTaskManager._clsInputKey.useDoubleIndex(0, 3);
     OrganizeTaskManager.dialogPopUp = new BaseDialogPopup();
     OrganizeTaskManager.Instance    = this;
 }
Beispiel #11
0
 public void FirstInit()
 {
     if (!this.isCreate)
     {
         TaskOrganizeDetail.KeyController = OrganizeTaskManager.GetKeyControl();
         this.isCreate = true;
     }
 }
 public void FirstInit()
 {
     if (!isCreate)
     {
         KeyController = OrganizeTaskManager.GetKeyControl();
         isCreate      = true;
     }
 }
Beispiel #13
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);
        }
        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);
        }
Beispiel #15
0
 public virtual void FirstInit()
 {
     if (!isCreate)
     {
         KeyController = OrganizeTaskManager.GetKeyControl();
         detailManager.Init();
         index     = 0;
         isControl = false;
         isEnd     = false;
         isCreate  = true;
     }
 }
Beispiel #16
0
 public virtual void FirstInit()
 {
     if (!this.isCreate)
     {
         TaskOrganizeListDetail.KeyController = OrganizeTaskManager.GetKeyControl();
         this.detailManager.Init();
         this.index     = 0;
         this.isControl = false;
         this.isEnd     = false;
         this.isCreate  = true;
     }
 }
Beispiel #17
0
 public void ShowSelectTender()
 {
     ((Component)base.transform).GetComponent <UIPanel>().alpha = 1f;
     State = TenderState.Select;
     SoundUtils.PlaySE(SEFIleInfos.CommonEnter1);
     ((Component)base.transform).GetComponent <UIPanel>().widgetsAreStatic = false;
     tenderDic = OrganizeTaskManager.Instance.GetLogicManager().GetAvailableSweets(OrganizeTaskManager.Instance.GetTopTask().GetDeckID());
     _tenderPanel.transform.localPosition = new Vector3(0f, 0f);
     _mainBg.transform.localPosition      = new Vector3(0f, 0f);
     _mainBg.gameObject.SafeGetTweenAlpha(0f, 0.6f, 0.5f, 0f, UITweener.Method.Linear, UITweener.Style.Once, _mainBg.gameObject, string.Empty);
     _tenderPanel.gameObject.SafeGetTweenAlpha(0f, 1f, 0.5f, 0f, UITweener.Method.Linear, UITweener.Style.Once, _tenderPanel.gameObject, string.Empty);
     OrganizeTaskManager.GetDialogPopUp().Open(_tenderPanel.gameObject, 0f, 0f, 1f, 1f);
     CheckMainDialog();
 }
 public void ShowOther(OrganizeTender.TenderState state)
 {
     this._mamiyaPanel.get_transform().set_localPosition(Vector3.get_zero());
     this._otherBg.get_transform().set_localPosition(Vector3.get_zero());
     this._mamiyaPanel.get_gameObject().SafeGetTweenAlpha(0f, 1f, 0.5f, 0f, UITweener.Method.Linear, UITweener.Style.Once, this._mamiyaPanel.get_gameObject(), string.Empty);
     this._otherBg.get_gameObject().SafeGetTweenAlpha(0f, 0.6f, 0.5f, 0f, UITweener.Method.Linear, UITweener.Style.Once, this._otherBg.get_gameObject(), string.Empty);
     OrganizeTaskManager.GetDialogPopUp().Open(this._mamiyaPanel.get_gameObject(), 0f, 0f, 1f, 1f);
     this.setIndex2 = 0;
     this.State     = state;
     if (this.State == OrganizeTender.TenderState.Maimiya)
     {
         int num      = Random.Range(0, 2);
         int voiceNum = -1;
         int num2     = num;
         if (num2 != 0)
         {
             if (num2 == 1)
             {
                 voiceNum = 12;
             }
         }
         else
         {
             voiceNum = 11;
         }
         ShipUtils.PlayPortVoice(voiceNum);
         this.setUseDialog();
     }
     else if (this.State == OrganizeTender.TenderState.Irako)
     {
         this.State = OrganizeTender.TenderState.Irako;
         int num3      = Random.Range(0, 2);
         int voiceNum2 = -1;
         int num2      = num3;
         if (num2 != 0)
         {
             if (num2 == 1)
             {
                 voiceNum2 = 14;
             }
         }
         else
         {
             voiceNum2 = 13;
         }
         ShipUtils.PlayPortVoice(voiceNum2);
         this.setUseDialog();
     }
     this.updateSubBtn();
 }
 public void ShowSelectTender()
 {
     base.get_transform().GetComponent <UIPanel>().alpha = 1f;
     this.State = OrganizeTender.TenderState.Select;
     SoundUtils.PlaySE(SEFIleInfos.CommonEnter1);
     base.get_transform().GetComponent <UIPanel>().widgetsAreStatic = false;
     this.tenderDic = OrganizeTaskManager.Instance.GetLogicManager().GetAvailableSweets(OrganizeTaskManager.Instance.GetTopTask().GetDeckID());
     this._tenderPanel.get_transform().set_localPosition(new Vector3(0f, 0f));
     this._mainBg.get_transform().set_localPosition(new Vector3(0f, 0f));
     this._mainBg.get_gameObject().SafeGetTweenAlpha(0f, 0.6f, 0.5f, 0f, UITweener.Method.Linear, UITweener.Style.Once, this._mainBg.get_gameObject(), string.Empty);
     this._tenderPanel.get_gameObject().SafeGetTweenAlpha(0f, 1f, 0.5f, 0f, UITweener.Method.Linear, UITweener.Style.Once, this._tenderPanel.get_gameObject(), string.Empty);
     OrganizeTaskManager.GetDialogPopUp().Open(this._tenderPanel.get_gameObject(), 0f, 0f, 1f, 1f);
     this.CheckMainDialog();
 }
Beispiel #20
0
 protected override bool Run()
 {
     if (this.isEnd)
     {
         if (this.changeState == "list")
         {
             OrganizeTaskManager.ReqPhase(OrganizeTaskManager.OrganizePhase.List);
         }
         else if (this.changeState == "top")
         {
             OrganizeTaskManager.ReqPhase(OrganizeTaskManager.OrganizePhase.Phase_ST);
         }
         return(false);
     }
     if (TaskOrganizeListDetail.KeyController.IsLeftDown())
     {
         if (!this.ship.IsLocked())
         {
             this.detailManager.buttons.LockSwitch.MoveLockBtn();
         }
     }
     else if (TaskOrganizeListDetail.KeyController.IsRightDown())
     {
         if (this.ship.IsLocked())
         {
             this.detailManager.buttons.LockSwitch.MoveLockBtn();
         }
     }
     else if (TaskOrganizeListDetail.KeyController.IsShikakuDown())
     {
         this.detailManager.buttons.LockSwitch.MoveLockBtn();
     }
     else if (TaskOrganizeListDetail.KeyController.IsMaruDown())
     {
         if (!this.isEnd)
         {
             this.ChangeButtonEL(null);
         }
     }
     else if (TaskOrganizeListDetail.KeyController.IsBatuDown())
     {
         this.BackDataEL(null);
     }
     if (TaskOrganizeListDetail.KeyController.IsRDown())
     {
         SingletonMonoBehaviour <PortObjectManager> .Instance.BackToStrategy();
     }
     return(true);
 }
        protected override void Start()
        {
            IsCreate = false;
            IsShip   = false;
            TaskOrganizeList.KeyController = new KeyControl();
            TaskOrganizeList.KeyController.useDoubleIndex(0, 3);
            _mainObj       = OrganizeTaskManager.GetMainObject().transform.FindChild("OrganizeScrollListParent").gameObject;
            _shipListPanel = _mainObj.transform.FindChild("List/ListFrame/ShipListScroll").gameObject;
            _maskList      = ((Component)_mainObj.transform.FindChild("Panel/ListBackMask")).GetComponent <UITexture>();
            UIButtonMessage component = _maskList.GetComponent <UIButtonMessage>();

            component.target       = base.gameObject;
            component.functionName = "BackListEL";
            component.trigger      = UIButtonMessage.Trigger.OnClick;
        }
 public bool FirstInit()
 {
     if (!this.IsCreate)
     {
         TaskOrganizeTop.KeyController = OrganizeTaskManager.GetKeyControl();
         GameObject gameObject = GameObject.Find("OrganizeRoot").get_gameObject();
         Util.FindParentToChild <UIPanel>(ref this._bgPanel, gameObject.get_transform(), "BackGround");
         Util.FindParentToChild <UIPanel>(ref this._bannerPanel, gameObject.get_transform(), "Banner");
         TaskOrganizeTop.decks       = OrganizeTaskManager.Instance.GetLogicManager().MapArea.GetDecks();
         TaskOrganizeTop.allShip     = OrganizeTaskManager.Instance.GetLogicManager().GetShipList();
         TaskOrganizeTop.BannerIndex = 1;
         TaskOrganizeTop.SystemIndex = 0;
         OrganizeTaskManager.Instance.GetTopTask().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), true);
         }
         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");
         UIPanel component = this._bgPanel.get_transform().FindChild("MiscContainer").GetComponent <UIPanel>();
         Util.FindParentToChild <UILabel>(ref this._fleetNameLabel, component.get_transform(), "DeckNameLabel");
         this._fleetNameLabel.supportEncoding = false;
         Util.FindParentToChild <UISprite>(ref this.deckIcon, component.get_transform(), "DeckIcon");
         DeckModel[] array = new DeckModel[TaskOrganizeTop.decks.Length];
         TaskOrganizeTop.decks.CopyTo(array, 0);
         DeckModel deckModel = SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck;
         if (deckModel == null)
         {
             deckModel = array[0];
         }
         this.deckSwitchManager.Init((OrganizeManager)OrganizeTaskManager.Instance.GetLogicManager(), array, this, TaskOrganizeTop.KeyController, false, deckModel, 50);
         this.deckChangeArrows.UpdateView();
         this._bannerManager.ForEach(delegate(OrganizeBannerManager e)
         {
             e.updateBannerWhenShipExist(true, false);
         });
         this.UpdateSystemButtons();
         this.UpdeteDeckIcon();
         this.IsCreate = true;
         this.CreateTender();
         this._isDragDrop = false;
     }
     return(true);
 }
Beispiel #23
0
 public bool FirstInit()
 {
     if (!IsCreate)
     {
         KeyController = OrganizeTaskManager.GetKeyControl();
         GameObject gameObject = GameObject.Find("OrganizeRoot").gameObject;
         Util.FindParentToChild(ref _bgPanel, gameObject.transform, "BackGround");
         Util.FindParentToChild(ref _bannerPanel, gameObject.transform, "Banner");
         decks       = OrganizeTaskManager.Instance.GetLogicManager().MapArea.GetDecks();
         allShip     = OrganizeTaskManager.Instance.GetLogicManager().GetShipList();
         BannerIndex = 1;
         SystemIndex = 0;
         OrganizeTaskManager.Instance.GetTopTask().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);
         }
         Transform parent = _bgPanel.transform.FindChild("SideButtons");
         Util.FindParentToChild(ref _allUnsetBtn, parent, "AllUnsetBtn");
         Util.FindParentToChild(ref _tenderBtn, parent, "TenderBtn");
         Util.FindParentToChild(ref _fleetNameBtn, parent, "DeckNameBtn");
         UIPanel component = ((Component)_bgPanel.transform.FindChild("MiscContainer")).GetComponent <UIPanel>();
         Util.FindParentToChild(ref _fleetNameLabel, component.transform, "DeckNameLabel");
         _fleetNameLabel.supportEncoding = false;
         Util.FindParentToChild(ref deckIcon, component.transform, "DeckIcon");
         DeckModel[] array = new DeckModel[decks.Length];
         decks.CopyTo(array, 0);
         DeckModel deckModel = SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck;
         if (deckModel == null)
         {
             deckModel = array[0];
         }
         deckSwitchManager.Init((OrganizeManager)OrganizeTaskManager.Instance.GetLogicManager(), array, this, KeyController, otherEnabled: false, deckModel);
         deckChangeArrows.UpdateView();
         _bannerManager.ForEach(delegate(OrganizeBannerManager e)
         {
             e.updateBannerWhenShipExist(openAnimation: true);
         });
         UpdateSystemButtons();
         UpdeteDeckIcon();
         IsCreate = true;
         CreateTender();
         _isDragDrop = false;
     }
     return(true);
 }
Beispiel #24
0
        public void ShowOther(TenderState state)
        {
            _mamiyaPanel.transform.localPosition = Vector3.zero;
            _otherBg.transform.localPosition     = Vector3.zero;
            _mamiyaPanel.gameObject.SafeGetTweenAlpha(0f, 1f, 0.5f, 0f, UITweener.Method.Linear, UITweener.Style.Once, _mamiyaPanel.gameObject, string.Empty);
            _otherBg.gameObject.SafeGetTweenAlpha(0f, 0.6f, 0.5f, 0f, UITweener.Method.Linear, UITweener.Style.Once, _otherBg.gameObject, string.Empty);
            OrganizeTaskManager.GetDialogPopUp().Open(_mamiyaPanel.gameObject, 0f, 0f, 1f, 1f);
            setIndex2 = 0;
            State     = state;
            if (State == TenderState.Maimiya)
            {
                int num      = Random.Range(0, 2);
                int voiceNum = -1;
                switch (num)
                {
                case 0:
                    voiceNum = 11;
                    break;

                case 1:
                    voiceNum = 12;
                    break;
                }
                ShipUtils.PlayPortVoice(voiceNum);
                setUseDialog();
            }
            else if (State == TenderState.Irako)
            {
                State = TenderState.Irako;
                int num2      = Random.Range(0, 2);
                int voiceNum2 = -1;
                switch (num2)
                {
                case 0:
                    voiceNum2 = 13;
                    break;

                case 1:
                    voiceNum2 = 14;
                    break;
                }
                ShipUtils.PlayPortVoice(voiceNum2);
                setUseDialog();
            }
            updateSubBtn();
        }
Beispiel #25
0
        protected override bool Run()
        {
            Main.Update();
            if (isEnd)
            {
                if (changeState == "detail")
                {
                    OrganizeTaskManager.ReqPhase(OrganizeTaskManager.OrganizePhase.Detail);
                    _state2 = OrganizeState.Detail;
                }
                else if (changeState == "list")
                {
                    OrganizeTaskManager.ReqPhase(OrganizeTaskManager.OrganizePhase.List);
                    _state2 = OrganizeState.List;
                }
                isEnd = false;
                return(false);
            }
            if (controlState != null)
            {
                if (isTenderAnimation())
                {
                    return(true);
                }
                switch (_state)
                {
                case OrganizeState.Top:
                    _state2 = OrganizeState.Top;
                    return(StateKeyControl_Banner());

                case OrganizeState.System:
                    _state2 = OrganizeState.System;
                    return(StateKeyControl_System());

                case OrganizeState.Tender:
                    _state2 = OrganizeState.Tender;
                    return(StateKeyControl_Tender());
                }
            }
            return(true);
        }
Beispiel #26
0
 protected override bool Run()
 {
     if (this.isEnd)
     {
         if (this.changeState == "top")
         {
             OrganizeTaskManager.Instance.GetTopTask()._state2 = TaskOrganizeTop.OrganizeState.Top;
             OrganizeTaskManager.ReqPhase(OrganizeTaskManager.OrganizePhase.Phase_ST);
         }
         else if (this.changeState == "list")
         {
             OrganizeTaskManager.Instance.GetTopTask()._state2 = TaskOrganizeTop.OrganizeState.List;
             OrganizeTaskManager.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);
     }
     if (TaskOrganizeDetail.KeyController.IsRDown())
     {
         SingletonMonoBehaviour <PortObjectManager> .Instance.BackToStrategy();
     }
     return(true);
 }
Beispiel #27
0
 public void FirstInit()
 {
     if (!this.IsCreated)
     {
         this.IsCreate = false;
         this.IsShip   = false;
         this.AllShips = OrganizeTaskManager.Instance.GetLogicManager().GetShipList();
         TaskOrganizeList.KeyController = new KeyControl(0, 0, 0.4f, 0.1f);
         TaskOrganizeList.KeyController.useDoubleIndex(0, 3);
         this._mainObj       = OrganizeTaskManager.GetMainObject().get_transform().FindChild("OrganizeScrollListParent").get_gameObject();
         this._shipListPanel = this._mainObj.get_transform().FindChild("List/ListFrame/ShipListScroll").get_gameObject();
         this._maskList      = this._mainObj.get_transform().FindChild("Panel/ListBackMask").GetComponent <UITexture>();
         UIButtonMessage component = this._maskList.GetComponent <UIButtonMessage>();
         component.target            = base.get_gameObject();
         component.functionName      = "BackListEL";
         component.trigger           = UIButtonMessage.Trigger.OnClick;
         TaskOrganizeList.ListScroll = this._mainObj.get_transform().FindChild("List").GetComponent <OrganizeScrollListParent>();
         TaskOrganizeList.ListScroll.Initialize(OrganizeTaskManager.Instance.GetLogicManager(), this.Camera);
         TaskOrganizeList.ListScroll.HeadFocus();
         TaskOrganizeList.ListScroll.SetOnSelect(new OrganizeScrollListParent.OnSelectCallBack(this.ListSelectEL));
         TaskOrganizeList.ListScroll.SetOnCancel(new Action(this.ListCancelEL));
         this.IsCreated = true;
     }
 }
 public void FirstInit()
 {
     if (!IsCreated)
     {
         IsCreate      = false;
         IsShip        = false;
         AllShips      = OrganizeTaskManager.Instance.GetLogicManager().GetShipList();
         KeyController = new KeyControl();
         KeyController.useDoubleIndex(0, 3);
         _mainObj       = OrganizeTaskManager.GetMainObject().transform.FindChild("OrganizeScrollListParent").gameObject;
         _shipListPanel = _mainObj.transform.FindChild("List/ListFrame/ShipListScroll").gameObject;
         _maskList      = ((Component)_mainObj.transform.FindChild("Panel/ListBackMask")).GetComponent <UITexture>();
         UIButtonMessage component = _maskList.GetComponent <UIButtonMessage>();
         component.target       = base.gameObject;
         component.functionName = "BackListEL";
         component.trigger      = UIButtonMessage.Trigger.OnClick;
         ListScroll             = ((Component)_mainObj.transform.FindChild("List")).GetComponent <OrganizeScrollListParent>();
         ListScroll.Initialize(OrganizeTaskManager.Instance.GetLogicManager(), Camera);
         ListScroll.HeadFocus();
         ListScroll.SetOnSelect(ListSelectEL);
         ListScroll.SetOnCancel(ListCancelEL);
         IsCreated = true;
     }
 }
 protected override void Start()
 {
     TaskOrganizeListDetail.KeyController = OrganizeTaskManager.GetKeyControl();
 }
Beispiel #30
0
 public virtual void UpdateDeckSwitchManager()
 {
     OrganizeTaskManager.OrganizePhase phase = OrganizeTaskManager.GetPhase();
     deckSwitchManager.keyControlEnable = (phase == OrganizeTaskManager.OrganizePhase.Phase_ST && controlState != "tender" && !isTenderAnimation());
 }