示例#1
0
        public void SetKeyController(KeyControl keyController, bool isFocusLeft = true)
        {
            this.mKeyController = keyController;
            App.OnlyController  = this.mKeyController;
            int focus = (!isFocusLeft) ? 1 : 0;

            this.mUIButtonManager.setFocus(focus);
            this.mUIButtonManager.isPlaySE = true;
        }
 private void OnDestroy()
 {
     OnCallDestroy();
     handler               = null;
     templateSprite        = null;
     switchableIconSprites = null;
     keyController         = null;
     decks = null;
 }
示例#3
0
 private void OnDestroy()
 {
     this.OnCallDestroy();
     this.handler               = null;
     this.templateSprite        = null;
     this.switchableIconSprites = null;
     this.keyController         = null;
     this.decks = null;
 }
示例#4
0
 private void OnSelectPositive()
 {
     if (mOnSelectPositiveListener != null && mKeyController != null)
     {
         mKeyController     = null;
         App.OnlyController = null;
         mOnSelectPositiveListener();
         SoundUtils.PlaySE(SEFIleInfos.CommonEnter1);
     }
 }
示例#5
0
 private void OnSelectPositive()
 {
     if (this.mOnSelectPositiveListener != null && this.mKeyController != null)
     {
         this.mKeyController = null;
         App.OnlyController  = null;
         this.mOnSelectPositiveListener.Invoke();
         SoundUtils.PlaySE(SEFIleInfos.CommonEnter1);
     }
 }
示例#6
0
 public void init(SortKey SortKey, KeyControl KeyController)
 {
     isControl      = false;
     sortIndex      = 0;
     _nowSortKey    = SortKey;
     _keyController = KeyController;
     stateList      = new string[4];
     _uiSortBtn     = new UISprite[4];
     for (int i = 0; i < 4; i++)
     {
         _uiSortBtn[i] = ((Component)base.transform.FindChild(stateList[i])).GetComponent <UISprite>();
     }
     SetListState();
     SetDepth();
 }
 private void Start()
 {
     setNowScene(Generics.Scene.Strategy.ToString(), isLoadLevel: false);
     SceneNo = new Dictionary <string, int>(StringComparer.OrdinalIgnoreCase);
     SceneNo.Add(Generics.Scene.Organize.ToString(), 0);
     SceneNo.Add(Generics.Scene.Remodel.ToString(), 1);
     SceneNo.Add(Generics.Scene.Arsenal.ToString(), 2);
     SceneNo.Add(Generics.Scene.Supply.ToString(), 3);
     SceneNo.Add(Generics.Scene.Duty.ToString(), 4);
     SceneNo.Add(Generics.Scene.PortTop.ToString(), 5);
     SceneNo.Add(Generics.Scene.Strategy.ToString(), 6);
     SceneNo.Add(Generics.Scene.Repair.ToString(), 7);
     SceneNo.Add(Generics.Scene.ArsenalSelector.ToString(), 8);
     dummyKey = new KeyControl();
 }
示例#8
0
 public void init(SortKey SortKey, KeyControl KeyController)
 {
     this.isControl      = false;
     this.sortIndex      = 0;
     this._nowSortKey    = SortKey;
     this._keyController = KeyController;
     this.stateList      = new string[4];
     this._uiSortBtn     = new UISprite[4];
     for (int i = 0; i < 4; i++)
     {
         this._uiSortBtn[i] = base.get_transform().FindChild(this.stateList[i]).GetComponent <UISprite>();
     }
     this.SetListState();
     this.SetDepth();
 }
示例#9
0
 private void Start()
 {
     this.setNowScene(Generics.Scene.Strategy.ToString(), false);
     this.SceneNo = new Dictionary <string, int>(StringComparer.get_OrdinalIgnoreCase());
     this.SceneNo.Add(Generics.Scene.Organize.ToString(), 0);
     this.SceneNo.Add(Generics.Scene.Remodel.ToString(), 1);
     this.SceneNo.Add(Generics.Scene.Arsenal.ToString(), 2);
     this.SceneNo.Add(Generics.Scene.Supply.ToString(), 3);
     this.SceneNo.Add(Generics.Scene.Duty.ToString(), 4);
     this.SceneNo.Add(Generics.Scene.PortTop.ToString(), 5);
     this.SceneNo.Add(Generics.Scene.Strategy.ToString(), 6);
     this.SceneNo.Add(Generics.Scene.Repair.ToString(), 7);
     this.SceneNo.Add(Generics.Scene.ArsenalSelector.ToString(), 8);
     this.dummyKey = new KeyControl(0, 0, 0.4f, 0.1f);
 }
示例#10
0
 private void OnDestroy()
 {
     if (ienum != null)
     {
         StopCoroutine(ienum);
     }
     ienum               = null;
     myPanel             = null;
     dialogAnimation     = null;
     dialogMessages      = null;
     BackCollider        = null;
     keyController       = null;
     CameraBlur          = null;
     CommonMessage       = null;
     Children            = null;
     ShikakuButtonAction = null;
 }
示例#11
0
 public void SetKeyController(KeyControl keyController)
 {
     if (keyController == null)
     {
         if (mKeyController != null)
         {
             mKeyController.reset();
         }
         mKeyController = null;
     }
     else
     {
         mKeyController = keyController;
         mKeyController.reset(0, 3);
         mKeyController.setChangeValue(-1f, 0f, 1f, 0f);
     }
 }
示例#12
0
        protected void Init(ManagerBase manager, DeckModel[] srcDecks, CommonDeckSwitchHandler handler, KeyControl keyController, bool otherEnabled, int currentIdx, int horizontalIconMargin)
        {
            this.decks                = srcDecks;
            this.handler              = handler;
            this.keyController        = keyController;
            this.currentIdx           = currentIdx;
            this.otherEnabled         = otherEnabled;
            this.horizontalIconMargin = horizontalIconMargin;
            int deckCount = manager.UserInfo.DeckCount;

            this.keyControlEnable = true;
            int           num          = deckCount + ((!otherEnabled) ? 0 : 1);
            int           num2         = -(num - 1) * horizontalIconMargin / 2;
            HashSet <int> validIndices = new HashSet <int>();

            this.decks.ForEach(delegate(DeckModel e)
            {
                validIndices.Add(e.Id - 1);
            });
            if (otherEnabled)
            {
                validIndices.Add(num - 1);
            }
            for (int i = 0; i < num; i++)
            {
                GameObject gameObject = Util.Instantiate(this.templateSprite.get_gameObject(), base.get_gameObject(), false, false);
                gameObject.get_transform().localPosition(new Vector3((float)(num2 + horizontalIconMargin * i), 0f, 0f));
                UISprite component = gameObject.GetComponent <UISprite>();
                if (validIndices.Contains(i))
                {
                    this.switchableIconSprites.Add(component);
                }
                else
                {
                    component.spriteName = "pin_none";
                }
            }
            this.templateSprite.SetActive(false);
            if (!handler.IsDeckSelectable(currentIdx, this.currentDeck))
            {
                this.ProcessNext(0);
            }
            handler.OnDeckChange(this.currentDeck);
            this.RefleshIcons();
        }
示例#13
0
 private void OnDestroy()
 {
     _Slider_Volume_BGM   = null;
     _Slider_Volume_SE    = null;
     _Slider_Volume_Voice = null;
     _Button_Volume_BGM   = null;
     _Button_Volume_SE    = null;
     _Button_Volume_Voice = null;
     _Button_Guide        = null;
     _sw_ball             = null;
     _sw_base             = null;
     _Cursor_bar          = null;
     chara_arm            = null;
     _Guide         = null;
     _bighand       = null;
     mKeyController = null;
     ARM_ANGLEMAP   = null;
     _Volumes       = null;
 }
        public void HidePortObject(KeyControl portKeyControl)
        {
            this.portKeyControl = portKeyControl;
            SoundUtils.PlaySE(SEFIleInfos.CommonEnter1);
            if (isHidePortObject)
            {
                SingletonMonoBehaviour <UIPortFrame> .Instance.SetActive(isActive : true);

                isHidePortObject = false;
                base.enabled     = false;
            }
            else
            {
                SingletonMonoBehaviour <UIPortFrame> .Instance.SetActive(isActive : false);

                isHidePortObject = true;
                base.enabled     = true;
            }
        }
示例#15
0
 private void OnDestroy()
 {
     this._Slider_Volume_BGM   = null;
     this._Slider_Volume_SE    = null;
     this._Slider_Volume_Voice = null;
     this._Button_Volume_BGM   = null;
     this._Button_Volume_SE    = null;
     this._Button_Volume_Voice = null;
     this._Button_Guide        = null;
     this._sw_ball             = null;
     this._sw_base             = null;
     this._Cursor_bar          = null;
     this.chara_arm            = null;
     this._Guide         = null;
     this._bighand       = null;
     this.mKeyController = null;
     this.ARM_ANGLEMAP   = null;
     this._Volumes       = null;
 }
示例#16
0
        public void SetKeyController(KeyControl keyController)
        {
            bool flag = keyController == null;

            if (flag)
            {
                bool flag2 = this.mKeyController != null;
                if (flag2)
                {
                    this.mKeyController.reset(0, 0, 0.4f, 0.1f);
                }
                this.mKeyController = null;
            }
            else
            {
                this.mKeyController = keyController;
                this.mKeyController.reset(0, 3, 0.4f, 0.1f);
                this.mKeyController.setChangeValue(-1f, 0f, 1f, 0f);
            }
        }
        protected override void Awake()
        {
            this._isFocus       = false;
            this._isInputEnable = true;
            this._isTweenPos    = false;
            this._camERCamera   = new Generics.InnerCamera(base.get_transform(), "ERCamera");
            this._camPECamera   = new UIShortCutMenu.PECamera(base.get_transform(), "PECamera");
            this._uiBtnsPanel   = base.get_transform().FindChild("ERCamera/SidePanel").GetComponent <UIPanel>();
            Transform transform = base.get_transform().FindChild("ERCamera/SidePanel/Btns").get_transform();

            this._dicBtns = new Dictionary <int, UIShortCutMenu.ButtonInfos>();
            this._dicBtns.Add(0, new UIShortCutMenu.ButtonInfos(transform.FindChild("StrategyBtn").GetComponent <UIButton>(), Generics.Scene.Strategy));
            this._dicBtns.Add(1, new UIShortCutMenu.ButtonInfos(transform.FindChild("PortTopBtn").GetComponent <UIButton>(), Generics.Scene.PortTop));
            this._dicBtns.Add(2, new UIShortCutMenu.ButtonInfos(transform.FindChild("OrganizeBtn").GetComponent <UIButton>(), Generics.Scene.Organize));
            this._dicBtns.Add(3, new UIShortCutMenu.ButtonInfos(transform.FindChild("SupplyBtn").GetComponent <UIButton>(), Generics.Scene.Supply));
            this._dicBtns.Add(4, new UIShortCutMenu.ButtonInfos(transform.FindChild("RepairBtn").GetComponent <UIButton>(), Generics.Scene.Repair));
            this._dicBtns.Add(5, new UIShortCutMenu.ButtonInfos(transform.FindChild("RemodelBtn").GetComponent <UIButton>(), Generics.Scene.Remodel));
            this._dicBtns.Add(6, new UIShortCutMenu.ButtonInfos(transform.FindChild("ArsenalBtn").GetComponent <UIButton>(), Generics.Scene.Arsenal));
            this._dicBtns.Add(7, new UIShortCutMenu.ButtonInfos(transform.FindChild("RevampBtn").GetComponent <UIButton>(), Generics.Scene.ImprovementArsenal));
            this._dicBtns.Add(8, new UIShortCutMenu.ButtonInfos(transform.FindChild("MissionBtn").GetComponent <UIButton>(), Generics.Scene.Duty));
            this._dicBtns.Add(9, new UIShortCutMenu.ButtonInfos(transform.FindChild("ItemBtn").GetComponent <UIButton>(), Generics.Scene.Item));
            this._dicBtns.Add(10, new UIShortCutMenu.ButtonInfos(transform.FindChild("SaveBtn").GetComponent <UIButton>(), Generics.Scene.SaveLoad));
            int num = 0;

            using (Dictionary <int, UIShortCutMenu.ButtonInfos> .Enumerator enumerator = this._dicBtns.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    KeyValuePair <int, UIShortCutMenu.ButtonInfos> current = enumerator.get_Current();
                    current.get_Value().Button.onClick = Util.CreateEventDelegateList(this, "_decideButton", num);
                    num++;
                }
            }
            this._fPanelPosXfmCenter = this._uiBtnsPanel.get_transform().get_localPosition().x;
            this._clsInput           = new KeyControl(0, 0, 0.4f, 0.1f);
            this._clsInput.setChangeValue(0f, 0f, 0f, 0f);
            this.disableButtonList = new List <int>();
        }
示例#18
0
 private void OpenDialog(DialogAnimation.AnimType type)
 {
     setActiveChildren(isActive: true);
     if (ienum != null)
     {
         StopCoroutine(ienum);
     }
     keyController       = new KeyControl();
     keyController.IsRun = false;
     myPanel.alpha       = 1f;
     if (isUseDefaultKeyController)
     {
         keyController.IsRun = true;
         App.OnlyController  = keyController;
         App.OnlyController.ClearKeyAll();
         keyController.firstUpdate = true;
     }
     dialogAnimation.StartAnim(type, isOpen: true);
     if (CameraBlur != null)
     {
         CameraBlur.enabled = true;
     }
     isOpen = true;
 }
示例#19
0
 private void OpenDialog(DialogAnimation.AnimType type)
 {
     this.setActiveChildren(true);
     if (this.ienum != null)
     {
         base.StopCoroutine(this.ienum);
     }
     this.keyController       = new KeyControl(0, 0, 0.4f, 0.1f);
     this.keyController.IsRun = false;
     this.myPanel.alpha       = 1f;
     if (this.isUseDefaultKeyController)
     {
         this.keyController.IsRun = true;
         App.OnlyController       = this.keyController;
         App.OnlyController.ClearKeyAll();
         this.keyController.firstUpdate = true;
     }
     this.dialogAnimation.StartAnim(type, true);
     if (this.CameraBlur != null)
     {
         this.CameraBlur.set_enabled(true);
     }
     this.isOpen = true;
 }
示例#20
0
        protected override void Awake()
        {
            _isFocus       = false;
            _isInputEnable = true;
            _isTweenPos    = false;
            _camERCamera   = new Generics.InnerCamera(base.transform, "ERCamera");
            _camPECamera   = new PECamera(base.transform, "PECamera");
            _uiBtnsPanel   = ((Component)base.transform.FindChild("ERCamera/SidePanel")).GetComponent <UIPanel>();
            Transform transform = base.transform.FindChild("ERCamera/SidePanel/Btns").transform;

            _dicBtns = new Dictionary <int, ButtonInfos>();
            _dicBtns.Add(0, new ButtonInfos(((Component)transform.FindChild("StrategyBtn")).GetComponent <UIButton>(), Generics.Scene.Strategy));
            _dicBtns.Add(1, new ButtonInfos(((Component)transform.FindChild("PortTopBtn")).GetComponent <UIButton>(), Generics.Scene.PortTop));
            _dicBtns.Add(2, new ButtonInfos(((Component)transform.FindChild("OrganizeBtn")).GetComponent <UIButton>(), Generics.Scene.Organize));
            _dicBtns.Add(3, new ButtonInfos(((Component)transform.FindChild("SupplyBtn")).GetComponent <UIButton>(), Generics.Scene.Supply));
            _dicBtns.Add(4, new ButtonInfos(((Component)transform.FindChild("RepairBtn")).GetComponent <UIButton>(), Generics.Scene.Repair));
            _dicBtns.Add(5, new ButtonInfos(((Component)transform.FindChild("RemodelBtn")).GetComponent <UIButton>(), Generics.Scene.Remodel));
            _dicBtns.Add(6, new ButtonInfos(((Component)transform.FindChild("ArsenalBtn")).GetComponent <UIButton>(), Generics.Scene.Arsenal));
            _dicBtns.Add(7, new ButtonInfos(((Component)transform.FindChild("RevampBtn")).GetComponent <UIButton>(), Generics.Scene.ImprovementArsenal));
            _dicBtns.Add(8, new ButtonInfos(((Component)transform.FindChild("MissionBtn")).GetComponent <UIButton>(), Generics.Scene.Duty));
            _dicBtns.Add(9, new ButtonInfos(((Component)transform.FindChild("ItemBtn")).GetComponent <UIButton>(), Generics.Scene.Item));
            _dicBtns.Add(10, new ButtonInfos(((Component)transform.FindChild("SaveBtn")).GetComponent <UIButton>(), Generics.Scene.SaveLoad));
            int num = 0;

            foreach (KeyValuePair <int, ButtonInfos> dicBtn in _dicBtns)
            {
                dicBtn.Value.Button.onClick = Util.CreateEventDelegateList(this, "_decideButton", num);
                num++;
            }
            Vector3 localPosition = _uiBtnsPanel.transform.localPosition;

            _fPanelPosXfmCenter = localPosition.x;
            _clsInput           = new KeyControl();
            _clsInput.setChangeValue(0f, 0f, 0f, 0f);
            disableButtonList = new List <int>();
        }
示例#21
0
 private void OnDestroy()
 {
     mKeyController   = null;
     mUIButtonManager = null;
 }
示例#22
0
 private void OnDestroy()
 {
     this.mKeyController   = null;
     this.mUIButtonManager = null;
 }
        public virtual void Init(ManagerBase manager, DeckModel[] decks, CommonDeckSwitchHandler handler, KeyControl keyController, bool otherEnabled, DeckModel currentDeck, int horizontalIconMargin = 50)
        {
            DeckModel[] array = (from e in decks
                                 where e.MissionState == MissionStates.NONE
                                 select e).ToArray();
            int num  = 0;
            int num2 = 0;

            DeckModel[] array2 = array;
            foreach (DeckModel deckModel in array2)
            {
                if (deckModel.Id == currentDeck.Id)
                {
                    num2 = num;
                    break;
                }
                num++;
            }
            Init(manager, array, handler, keyController, otherEnabled, num2, horizontalIconMargin);
        }
 protected virtual void Init(int menuNum, KeyControl key)
 {
     this.keyCon   = key;
     this.MenuNum  = menuNum;
     this.usePosNo = new int[, ]
     {
         {
             0,
             0,
             0,
             0,
             0,
             0,
             0,
             0
         },
         {
             0,
             0,
             0,
             0,
             0,
             0,
             0,
             0
         },
         {
             0,
             0,
             0,
             0,
             0,
             0,
             0,
             0
         },
         {
             1,
             3,
             7,
             0,
             0,
             0,
             0,
             0
         },
         {
             1,
             3,
             5,
             7,
             0,
             0,
             0,
             0
         },
         {
             1,
             2,
             3,
             7,
             8,
             0,
             0,
             0
         },
         {
             1,
             2,
             3,
             5,
             7,
             8,
             0,
             0
         },
         {
             1,
             2,
             3,
             4,
             6,
             7,
             8,
             0
         },
         {
             1,
             2,
             3,
             4,
             5,
             6,
             7,
             8
         }
     };
     for (int i = 0; i < this.Menus.Length; i++)
     {
         if (i >= this.MenuNum)
         {
             this.Menus[i].SetActive(false);
         }
     }
 }
示例#25
0
 public virtual void Init(ManagerBase manager, DeckModel[] decks, CommonDeckSwitchHandler handler, KeyControl keyController, bool otherEnabled)
 {
     this.Init(manager, decks, handler, keyController, otherEnabled, 0, 50);
 }
示例#26
0
        public virtual void Init(ManagerBase manager, DeckModel[] decks, CommonDeckSwitchHandler handler, KeyControl keyController, bool otherEnabled, DeckModel currentDeck, int horizontalIconMargin = 50)
        {
            DeckModel[] array = Enumerable.ToArray <DeckModel>(Enumerable.Where <DeckModel>(decks, (DeckModel e) => e.MissionState == MissionStates.NONE));
            int         num   = 0;
            int         num2  = 0;

            DeckModel[] array2 = array;
            for (int i = 0; i < array2.Length; i++)
            {
                DeckModel deckModel = array2[i];
                if (deckModel.Id == currentDeck.Id)
                {
                    num2 = num;
                    break;
                }
                num++;
            }
            this.Init(manager, array, handler, keyController, otherEnabled, num2, horizontalIconMargin);
        }
 public void SetKeyController(KeyControl keyController)
 {
     this.keyController = keyController;
 }