private void Awake()
 {
     this._isMove     = false;
     this._dicButtons = new Dictionary <CtrlPartnerSelect.ButtonIndex, UIButton>();
     using (IEnumerator enumerator = Enum.GetValues(typeof(CtrlPartnerSelect.ButtonIndex)).GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             CtrlPartnerSelect.ButtonIndex buttonIndex = (CtrlPartnerSelect.ButtonIndex)((int)enumerator.get_Current());
             this._dicButtons.Add(buttonIndex, base.get_transform().FindChild("Button_" + buttonIndex.ToString()).GetComponent <UIButton>());
             this._dicButtons.get_Item(buttonIndex).onClick = Util.CreateEventDelegateList(this, "press_Button", buttonIndex);
         }
     }
     this._dicShipParts = new Dictionary <CtrlPartnerSelect.ShipPartsIndex, UITexture>();
     using (IEnumerator enumerator2 = Enum.GetValues(typeof(CtrlPartnerSelect.ShipPartsIndex)).GetEnumerator())
     {
         while (enumerator2.MoveNext())
         {
             CtrlPartnerSelect.ShipPartsIndex shipPartsIndex = (CtrlPartnerSelect.ShipPartsIndex)((int)enumerator2.get_Current());
             this._dicShipParts.Add(shipPartsIndex, base.get_transform().FindChild("Ship_" + shipPartsIndex.ToString()).GetComponent <UITexture>());
         }
     }
     this._iStarterType  = CtrlStarterSelect.StarterType.Ex;
     this._nSelectedId   = 0;
     this._clsSwipeEvent = GameObject.Find("EventArea").GetComponent <UIDisplaySwipeEventRegion>();
     this._clsSwipeEvent.SetOnSwipeActionJudgeCallBack(new UIDisplaySwipeEventRegion.SwipeJudgeDelegate(this.OnSwipe));
     this._clsSwipeEvent.SetEventCatchCamera(StartupTaskManager.GetPSVitaMovie().GetComponent <Camera>());
     this._isDecide = false;
     this.panel.widgetsAreStatic = true;
 }
Пример #2
0
        private void ChangeStarterTexture(CtrlStarterSelect.StarterType iType)
        {
            bool flag = iType == CtrlStarterSelect.StarterType.Ex;

            if (flag)
            {
                if (this._listStarterTexture.get_Item(0).get_Item(1) == null)
                {
                    this._listStarterTexture.get_Item(0).set_Item(1, Resources.Load <Texture2D>("Textures/Startup/Starter/starter1_on"));
                }
                if (this._listStarterTexture.get_Item(1).get_Item(0) == null)
                {
                    this._listStarterTexture.get_Item(1).set_Item(0, Resources.Load <Texture2D>("Textures/Startup/Starter/starter2"));
                }
                this._listStarterBtn.get_Item(0).GetComponent <UITexture>().mainTexture = this._listStarterTexture.get_Item(0).get_Item(1);
                this._listStarterBtn.get_Item(1).GetComponent <UITexture>().mainTexture = this._listStarterTexture.get_Item(1).get_Item(0);
            }
            else
            {
                if (this._listStarterTexture.get_Item(0).get_Item(0) == null)
                {
                    this._listStarterTexture.get_Item(0).set_Item(0, Resources.Load <Texture2D>("Textures/Startup/Starter/starter1"));
                }
                if (this._listStarterTexture.get_Item(1).get_Item(1) == null)
                {
                    this._listStarterTexture.get_Item(1).set_Item(1, Resources.Load <Texture2D>("Textures/Startup/Starter/starter2_on"));
                }
                this._listStarterBtn.get_Item(0).GetComponent <UITexture>().mainTexture = this._listStarterTexture.get_Item(0).get_Item(0);
                this._listStarterBtn.get_Item(1).GetComponent <UITexture>().mainTexture = this._listStarterTexture.get_Item(1).get_Item(1);
            }
        }
Пример #3
0
 public void PreparaNext(bool isFoward)
 {
     CtrlStarterSelect.StarterType iSelectType = this._iSelectType;
     this._iSelectType = (CtrlStarterSelect.StarterType)Mathe.NextElement((int)this._iSelectType, 0, 1, isFoward);
     if (iSelectType != this._iSelectType)
     {
         this.ChangeFocus(this._iSelectType);
     }
 }
Пример #4
0
        private void ChangeFocus(CtrlStarterSelect.StarterType iType)
        {
            SoundUtils.PlaySE(SEFIleInfos.CommonCursolMove);
            bool flag = iType == CtrlStarterSelect.StarterType.Ex;

            this.ChangeStarterTexture(iType);
            this._listStarterBtn.get_Item((int)this._iSelectType).GetComponent <UITexture>().depth = 1;
            this._listStarterBtn.get_Item((int)(CtrlStarterSelect.StarterType.Normal - this._iSelectType)).GetComponent <UITexture>().depth = 0;
            UISelectedObject.SelectedOneBoardZoomUpDownStartup(this._listStarterBtn.get_Item(0).get_gameObject(), flag);
            UISelectedObject.SelectedOneBoardZoomUpDownStartup(this._listStarterBtn.get_Item(1).get_gameObject(), !flag);
        }
Пример #5
0
        public bool Init(Action <CtrlStarterSelect.StarterType> onSelectStarter, Action onCancel)
        {
            UIStartupNavigation navigation = StartupTaskManager.GetNavigation();

            navigation.SetNavigationInStarterSelect();
            base.get_transform().localScaleOne();
            this._actOnSelectStarter = onSelectStarter;
            this._actOnCancel        = onCancel;
            this._iSelectType        = CtrlStarterSelect.StarterType.Ex;
            this.ChangeFocus(this._iSelectType);
            return(true);
        }
Пример #6
0
 public void OnClickStarter(CtrlStarterSelect.StarterType iType)
 {
     if (this._iSelectType == iType)
     {
         this._listStarterBtn.ForEach(delegate(UIButton x)
         {
             UISelectedObject.SelectedOneBoardZoomUpDownStartup(x.get_gameObject(), false);
         });
         SoundUtils.PlaySE(SEFIleInfos.CommonEnter2);
         base.get_transform().localScaleZero();
         Dlg.Call <CtrlStarterSelect.StarterType>(ref this._actOnSelectStarter, iType);
         return;
     }
     this._iSelectType = iType;
     this.ChangeFocus(iType);
 }
Пример #7
0
 private void Awake()
 {
     _isMove     = false;
     _dicButtons = new Dictionary <ButtonIndex, UIButton>();
     foreach (int value in Enum.GetValues(typeof(ButtonIndex)))
     {
         _dicButtons.Add((ButtonIndex)value, ((Component)base.transform.FindChild("Button_" + ((ButtonIndex)value).ToString())).GetComponent <UIButton>());
         _dicButtons[(ButtonIndex)value].onClick = Util.CreateEventDelegateList(this, "press_Button", (ButtonIndex)value);
     }
     _dicShipParts = new Dictionary <ShipPartsIndex, UITexture>();
     foreach (int value2 in Enum.GetValues(typeof(ShipPartsIndex)))
     {
         _dicShipParts.Add((ShipPartsIndex)value2, ((Component)base.transform.FindChild("Ship_" + ((ShipPartsIndex)value2).ToString())).GetComponent <UITexture>());
     }
     _iStarterType  = CtrlStarterSelect.StarterType.Ex;
     _nSelectedId   = 0;
     _clsSwipeEvent = GameObject.Find("EventArea").GetComponent <UIDisplaySwipeEventRegion>();
     _clsSwipeEvent.SetOnSwipeActionJudgeCallBack(OnSwipe);
     _clsSwipeEvent.SetEventCatchCamera(StartupTaskManager.GetPSVitaMovie().GetComponent <Camera>());
     _isDecide = false;
     panel.widgetsAreStatic = true;
 }
Пример #8
0
        private void Awake()
        {
            this._listStarterTexture = new List <List <Texture2D> >();
            List <List <Texture2D> > arg_34_0 = this._listStarterTexture;
            List <Texture2D>         list     = new List <Texture2D>(2);

            list.Add(null);
            list.Add(null);
            arg_34_0.Add(list);
            List <List <Texture2D> > arg_55_0 = this._listStarterTexture;

            list = new List <Texture2D>(2);
            list.Add(null);
            list.Add(null);
            arg_55_0.Add(list);
            CtrlStarterSelect.StarterType iType = CtrlStarterSelect.StarterType.Ex;
            this._listStarterBtn.ForEach(delegate(UIButton x)
            {
                x.onClick = Util.CreateEventDelegateList(this, "OnClickStarter", iType);
                iType++;
            });
            this._iSelectType = CtrlStarterSelect.StarterType.Ex;
        }
Пример #9
0
 private void OnStarterSelected(CtrlStarterSelect.StarterType iType)
 {
     _ctrlPartnerSelect.SetStarter(iType);
     _clsState.Clear();
     _clsState.AddState(InitPartnerSelect, UpdatePartnerSelect);
 }
Пример #10
0
 private void OnStarterSelected(CtrlStarterSelect.StarterType iType)
 {
     this._ctrlPartnerSelect.SetStarter(iType);
     this._clsState.Clear();
     this._clsState.AddState(new StatementMachine.StatementMachineInitialize(this.InitPartnerSelect), new StatementMachine.StatementMachineUpdate(this.UpdatePartnerSelect));
 }
 public void SetStarter(CtrlStarterSelect.StarterType iType)
 {
     this._iStarterType = iType;
     this._nSelectedId  = 0;
 }