private void Start() { if (Object.op_Equality((Object)this._button, (Object)null)) { this._button = (Button)((Component)this).GetComponent <Button>(); if (Object.op_Equality((Object)this._button, (Object)null)) { Debug.LogError((object)"Button none", (Object)this); Object.Destroy((Object)this); return; } } if (Object.op_Equality((Object)this._tmpText, (Object)null) && Object.op_Equality((Object)this._unityText, (Object)null)) { if (Object.op_Equality((Object)this._tmpText, (Object)null)) { this._tmpText = (TextMeshProUGUI)((Component)this).GetComponentInChildren <TextMeshProUGUI>(); } if (Object.op_Equality((Object)this._unityText, (Object)null)) { this._unityText = (Text)((Component)this).GetComponentInChildren <Text>(); } if (Object.op_Equality((Object)this._tmpText, (Object)null) && Object.op_Equality((Object)this._unityText, (Object)null)) { Debug.LogError((object)"Component Text none", (Object)this); Object.Destroy((Object)this); return; } } ColorBlock colors = ((Selectable)this._button).get_colors(); ReactiveProperty <bool> isOnUI = new ReactiveProperty <bool>(false); ReactiveProperty <bool> isPressUI = new ReactiveProperty <bool>(false); ObservableExtensions.Subscribe <bool>((IObservable <M0>)isOnUI, (Action <M0>)(isOn => { if (isOn) { if (isPressUI.get_Value()) { this.SetColor(((ColorBlock) ref colors).get_pressedColor()); } else { this.SetColor(((ColorBlock) ref colors).get_highlightedColor()); } } else if (isPressUI.get_Value()) { this.SetColor(((ColorBlock) ref colors).get_highlightedColor()); } else { this.SetColor(((ColorBlock) ref colors).get_normalColor()); } })); ObservableExtensions.Subscribe <bool>((IObservable <M0>)isPressUI, (Action <M0>)(isOn => { if (isOn) { this.SetColor(((ColorBlock) ref colors).get_pressedColor()); } else if (isOnUI.get_Value()) { this.SetColor(((ColorBlock) ref colors).get_highlightedColor()); } else { this.SetColor(((ColorBlock) ref colors).get_normalColor()); } })); ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerDownAsObservable((UIBehaviour)this._button), (Action <M0>)(_ => isPressUI.set_Value(true))); ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerUpAsObservable((UIBehaviour)this._button), (Action <M0>)(_ => isPressUI.set_Value(false))); ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this._button), (Action <M0>)(_ => isOnUI.set_Value(true))); ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerExitAsObservable((UIBehaviour)this._button), (Action <M0>)(_ => isOnUI.set_Value(false))); }
private void InitLink(SoundSetting.SoundGroup sg, SoundData sd, bool isSliderEvent) { this.LinkToggle(sg.toggle, (Action <bool>)(isOn => sd.Mute = isOn)); ObservableExtensions.Subscribe <bool>(UnityEventExtensions.AsObservable <bool>((UnityEvent <M0>)sg.toggle.onValueChanged), (Action <M0>)(isOn => ((Behaviour)sg.image).set_enabled(!isOn))); UnityUIComponentExtensions.SubscribeToInteractable((IObservable <bool>)Observable.Select <bool, bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(sg.toggle), (Func <M0, M1>)(b => !b)), (Selectable)sg.slider); if (isSliderEvent) { this.LinkSlider(sg.slider, (Action <float>)(value => sd.Volume = (int)value)); } else { ObservableExtensions.Subscribe <PointerEventData>(Observable.Where <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerDownAsObservable((UIBehaviour)sg.slider), (Func <M0, bool>)(_ => Input.GetMouseButtonDown(0))), (Action <M0>)(_ => this.EnterSE())); } }
private void AddEvent(VoiceSetting.SetData data) { ObservableExtensions.Subscribe <bool>(UnityEventExtensions.AsObservable <bool>((UnityEvent <M0>)data.toggle.onValueChanged), (Action <M0>)(isOn => { data.sd.Mute = isOn; ((Behaviour)data.image).set_enabled(!isOn); this.EnterSE(); })); UnityUIComponentExtensions.SubscribeToInteractable((IObservable <bool>)Observable.Select <bool, bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(data.toggle), (Func <M0, M1>)(b => !b)), (Selectable)data.slider); ObservableExtensions.Subscribe <int>((IObservable <M0>)Observable.Select <float, int>(UnityEventExtensions.AsObservable <float>((UnityEvent <M0>)data.slider.get_onValueChanged()), (Func <M0, M1>)(value => (int)value)), (Action <M0>)(value => data.sd.Volume = value)); ObservableExtensions.Subscribe <PointerEventData>(Observable.Where <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerDownAsObservable((UIBehaviour)data.slider), (Func <M0, bool>)(_ => Input.GetMouseButtonDown(0))), (Action <M0>)(_ => this.EnterSE())); }
private void Start() { if (!Object.op_Inequality((Object)this._button, (Object)null)) { return; } ObservableExtensions.Subscribe <PointerEventData>(Observable.Where <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this._button), (Func <M0, bool>)(_ => ((Selectable)this._button).IsInteractable())), (Action <M0>)(_ => { this._entered = true; this.Easing(true, this._focusDuration); })); ObservableExtensions.Subscribe <PointerEventData>(Observable.Where <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerExitAsObservable((UIBehaviour)this._button), (Func <M0, bool>)(_ => ((Selectable)this._button).IsInteractable())), (Action <M0>)(_ => { this._entered = false; this.Easing(false, this._focusDuration); })); ObservableExtensions.Subscribe <PointerEventData>(Observable.Where <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerDownAsObservable((UIBehaviour)this._button), (Func <M0, bool>)(_ => ((Selectable)this._button).IsInteractable() && this._entered)), (Action <M0>)(_ => this.Easing(false, this._clickDuration))); ObservableExtensions.Subscribe <PointerEventData>(Observable.Where <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerUpAsObservable((UIBehaviour)this._button), (Func <M0, bool>)(_ => ((Selectable)this._button).IsInteractable() && this._entered)), (Action <M0>)(_ => this.Easing(true, this._clickDuration))); }
private void Start() { if (Object.op_Equality((Object)this._toggle, (Object)null)) { this._toggle = (Toggle)((Component)this).GetComponent <Toggle>(); if (Object.op_Equality((Object)this._toggle, (Object)null)) { Debug.LogError((object)"Toggle none", (Object)this); Object.Destroy((Object)this); return; } } if (Object.op_Equality((Object)this._tmpText, (Object)null) && Object.op_Equality((Object)this._unityText, (Object)null)) { if (Object.op_Equality((Object)this._tmpText, (Object)null)) { this._tmpText = (TextMeshProUGUI)((Component)this).GetComponentInChildren <TextMeshProUGUI>(); } if (Object.op_Equality((Object)this._unityText, (Object)null)) { this._unityText = (Text)((Component)this).GetComponentInChildren <Text>(); } if (Object.op_Equality((Object)this._tmpText, (Object)null) && Object.op_Equality((Object)this._unityText, (Object)null)) { Debug.LogError((object)"Component Text none", (Object)this); Object.Destroy((Object)this); return; } } ColorBlock colors = ((Selectable)this._toggle).get_colors(); ReactiveProperty <bool> isOnUI = new ReactiveProperty <bool>(false); ReactiveProperty <bool> isPressUI = new ReactiveProperty <bool>(false); ObservableExtensions.Subscribe <bool>(Observable.Where <bool>((IObservable <M0>)isOnUI, (Func <M0, bool>)(_ => !this._toggle.get_isOn())), (Action <M0>)(isOn => { if (isOn) { if (isPressUI.get_Value()) { return; } this.SetColor(((ColorBlock) ref colors).get_highlightedColor()); } else { if (!isPressUI.get_Value()) { return; } this.SetColor(((ColorBlock) ref colors).get_highlightedColor()); } })); ObservableExtensions.Subscribe <bool>(Observable.Where <bool>((IObservable <M0>)isPressUI, (Func <M0, bool>)(_ => !this._toggle.get_isOn())), (Action <M0>)(isOn => { if (isOn || !isOnUI.get_Value()) { return; } this.SetColor(((ColorBlock) ref colors).get_highlightedColor()); })); ObservableExtensions.Subscribe <bool>(Observable.Where <bool>((IObservable <M0>)Observable.CombineLatest <bool, bool, bool>((IObservable <M0>)isPressUI, (IObservable <M1>)isOnUI, (Func <M0, M1, M2>)((x, y) => x && y)), (Func <M0, bool>)(isOn => isOn)), (Action <M0>)(_ => { if (this._toggle.get_isOn()) { return; } this.SetColor(((ColorBlock) ref colors).get_pressedColor()); })); ObservableExtensions.Subscribe <bool>(Observable.Where <bool>((IObservable <M0>)Observable.CombineLatest <bool, bool, bool>((IObservable <M0>)isPressUI, (IObservable <M1>)isOnUI, (Func <M0, M1, M2>)((x, y) => !x && !y)), (Func <M0, bool>)(isOut => isOut)), (Action <M0>)(_ => { if (this._toggle.get_isOn()) { this.SetColor(((ColorBlock) ref colors).get_pressedColor()); } else { this.SetColor(((ColorBlock) ref colors).get_normalColor()); } })); ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerDownAsObservable((UIBehaviour)this._toggle), (Action <M0>)(_ => isPressUI.set_Value(true))); ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerUpAsObservable((UIBehaviour)this._toggle), (Action <M0>)(_ => isPressUI.set_Value(false))); ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this._toggle), (Action <M0>)(_ => isOnUI.set_Value(true))); ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerExitAsObservable((UIBehaviour)this._toggle), (Action <M0>)(_ => isOnUI.set_Value(false))); ObservableExtensions.Subscribe <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(this._toggle), (Action <M0>)(isOn => { if (isOn) { this.SetColor(((ColorBlock) ref colors).get_pressedColor()); } else { this.SetColor(((ColorBlock) ref colors).get_normalColor()); } })); }
public void Initialize(int _slotNo, int _correctNo) { this.slotNo = _slotNo; this.correctNo = _correctNo; if (this.slotNo == -1 || this.correctNo == -1) { return; } if (Object.op_Implicit((Object)this.title)) { this.title.set_text(string.Format("{0}{1:00}", (object)"調整", (object)(this.correctNo + 1))); } this.UpdateCustomUI(); if (this.lstDisposable != null && this.lstDisposable.Count != 0) { int count = this.lstDisposable.Count; for (int index = 0; index < count; ++index) { this.lstDisposable[index].Dispose(); } } IDisposable disposable = (IDisposable)null; // ISSUE: object of a compiler-generated type is created ((IEnumerable <Toggle>) this.tglPosRate).Select <Toggle, \u003C\u003E__AnonType12 <Toggle, byte> >((Func <Toggle, int, \u003C\u003E__AnonType12 <Toggle, byte> >)((p, i) => new \u003C\u003E__AnonType12 <Toggle, byte>(p, (byte)i))).ToList <\u003C\u003E__AnonType12 <Toggle, byte> >().ForEach((Action <\u003C\u003E__AnonType12 <Toggle, byte> >)(p => { disposable = ObservableExtensions.Subscribe <bool>(Observable.Where <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(p.toggle), (Func <M0, bool>)(isOn => isOn)), (Action <M0>)(_ => this.acsCtrlSetting.correctSetting[this.correctNo].posRate = (int)p.index)); this.lstDisposable.Add(disposable); })); // ISSUE: object of a compiler-generated type is created ((IEnumerable <Toggle>) this.tglRotRate).Select <Toggle, \u003C\u003E__AnonType12 <Toggle, byte> >((Func <Toggle, int, \u003C\u003E__AnonType12 <Toggle, byte> >)((p, i) => new \u003C\u003E__AnonType12 <Toggle, byte>(p, (byte)i))).ToList <\u003C\u003E__AnonType12 <Toggle, byte> >().ForEach((Action <\u003C\u003E__AnonType12 <Toggle, byte> >)(p => { disposable = ObservableExtensions.Subscribe <bool>(Observable.Where <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(p.toggle), (Func <M0, bool>)(isOn => isOn)), (Action <M0>)(_ => this.acsCtrlSetting.correctSetting[this.correctNo].rotRate = (int)p.index)); this.lstDisposable.Add(disposable); })); // ISSUE: object of a compiler-generated type is created ((IEnumerable <Toggle>) this.tglSclRate).Select <Toggle, \u003C\u003E__AnonType12 <Toggle, byte> >((Func <Toggle, int, \u003C\u003E__AnonType12 <Toggle, byte> >)((p, i) => new \u003C\u003E__AnonType12 <Toggle, byte>(p, (byte)i))).ToList <\u003C\u003E__AnonType12 <Toggle, byte> >().ForEach((Action <\u003C\u003E__AnonType12 <Toggle, byte> >)(p => { disposable = ObservableExtensions.Subscribe <bool>(Observable.Where <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(p.toggle), (Func <M0, bool>)(isOn => isOn)), (Action <M0>)(_ => this.acsCtrlSetting.correctSetting[this.correctNo].sclRate = (int)p.index)); this.lstDisposable.Add(disposable); })); float downTimeCnt = 0.0f; float loopTimeCnt = 0.0f; bool change = false; int[] flag = new int[3] { 1, 2, 4 }; // ISSUE: object of a compiler-generated type is created ((IEnumerable <Button>) this.btnPos).Select <Button, \u003C\u003E__AnonType13 <Button, int> >((Func <Button, int, \u003C\u003E__AnonType13 <Button, int> >)((p, i) => new \u003C\u003E__AnonType13 <Button, int>(p, i))).ToList <\u003C\u003E__AnonType13 <Button, int> >().ForEach((Action <\u003C\u003E__AnonType13 <Button, int> >)(p => { disposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(p.btn), (Action <M0>)(_ => { if (change) { return; } int index = p.index / 2; int num = p.index % 2 != 0 ? 1 : -1; if (index == 0) { num *= -1; } this.chaCtrl.SetAccessoryPos(this.slotNo, this.correctNo, (float)num * this.movePosValue[this.acsCtrlSetting.correctSetting[this.correctNo].posRate], true, flag[index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 0] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 0]; this.inpPos[index].set_text(((Vector3) ref this.nowAcs.parts[this.slotNo].addMove.Address(this.correctNo, 0)).get_Item(index).ToString()); this.SetControllerTransform(); })); this.lstDisposable.Add(disposable); disposable = (IDisposable)DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <Unit>(Observable.RepeatUntilDestroy <Unit>(Observable.TakeUntil <Unit, PointerEventData>(Observable.SkipUntil <Unit, PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable((Component)p.btn), (IObservable <M1>)Observable.Do <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerDownAsObservable((UIBehaviour)p.btn), (Action <M0>)(_ => { downTimeCnt = 0.0f; loopTimeCnt = 0.0f; change = false; }))), (IObservable <M1>)ObservableTriggerExtensions.OnPointerUpAsObservable((UIBehaviour)p.btn)), (Component)this), (Action <M0>)(_ => { int index = p.index / 2; int num1 = p.index % 2 != 0 ? 1 : -1; if (index == 0) { num1 *= -1; } float num2 = (float)num1 * this.movePosValue[this.acsCtrlSetting.correctSetting[this.correctNo].posRate]; float num3 = 0.0f; downTimeCnt += Time.get_deltaTime(); if ((double)downTimeCnt <= 0.300000011920929) { return; } for (loopTimeCnt += Time.get_deltaTime(); (double)loopTimeCnt > 0.0500000007450581; loopTimeCnt -= 0.05f) { num3 += num2; } if ((double)num3 == 0.0) { return; } this.chaCtrl.SetAccessoryPos(this.slotNo, this.correctNo, num3, true, flag[index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 0] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 0]; this.inpPos[index].set_text(((Vector3) ref this.nowAcs.parts[this.slotNo].addMove.Address(this.correctNo, 0)).get_Item(index).ToString()); change = true; this.SetControllerTransform(); })), (Component)this); this.lstDisposable.Add(disposable); })); // ISSUE: object of a compiler-generated type is created ((IEnumerable <InputField>) this.inpPos).Select <InputField, \u003C\u003E__AnonType14 <InputField, int> >((Func <InputField, int, \u003C\u003E__AnonType14 <InputField, int> >)((p, i) => new \u003C\u003E__AnonType14 <InputField, int>(p, i))).ToList <\u003C\u003E__AnonType14 <InputField, int> >().ForEach((Action <\u003C\u003E__AnonType14 <InputField, int> >)(p => { disposable = ObservableExtensions.Subscribe <string>(UnityEventExtensions.AsObservable <string>((UnityEvent <M0>)p.inp.get_onEndEdit()), (Action <M0>)(value => { int index = p.index % 3; float num = CustomBase.ConvertValueFromTextLimit(-100f, 100f, 1, value); p.inp.set_text(num.ToString()); this.chaCtrl.SetAccessoryPos(this.slotNo, this.correctNo, num, false, flag[index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 0] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 0]; this.SetControllerTransform(); })); this.lstDisposable.Add(disposable); })); // ISSUE: object of a compiler-generated type is created ((IEnumerable <Button>) this.btnPosReset).Select <Button, \u003C\u003E__AnonType13 <Button, int> >((Func <Button, int, \u003C\u003E__AnonType13 <Button, int> >)((p, i) => new \u003C\u003E__AnonType13 <Button, int>(p, i))).ToList <\u003C\u003E__AnonType13 <Button, int> >().ForEach((Action <\u003C\u003E__AnonType13 <Button, int> >)(p => { disposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(p.btn), (Action <M0>)(_ => { this.inpPos[p.index].set_text("0"); this.chaCtrl.SetAccessoryPos(this.slotNo, this.correctNo, 0.0f, false, flag[p.index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 0] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 0]; this.SetControllerTransform(); })); this.lstDisposable.Add(disposable); })); // ISSUE: object of a compiler-generated type is created ((IEnumerable <Button>) this.btnRot).Select <Button, \u003C\u003E__AnonType13 <Button, int> >((Func <Button, int, \u003C\u003E__AnonType13 <Button, int> >)((p, i) => new \u003C\u003E__AnonType13 <Button, int>(p, i))).ToList <\u003C\u003E__AnonType13 <Button, int> >().ForEach((Action <\u003C\u003E__AnonType13 <Button, int> >)(p => { disposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(p.btn), (Action <M0>)(_ => { if (change) { return; } int index = p.index / 2; this.chaCtrl.SetAccessoryRot(this.slotNo, this.correctNo, (p.index % 2 != 0 ? 1f : -1f) * this.moveRotValue[this.acsCtrlSetting.correctSetting[this.correctNo].rotRate], true, flag[index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 1] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 1]; this.inpRot[index].set_text(((Vector3) ref this.nowAcs.parts[this.slotNo].addMove.Address(this.correctNo, 1)).get_Item(index).ToString()); this.SetControllerTransform(); })); this.lstDisposable.Add(disposable); disposable = (IDisposable)DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <Unit>(Observable.RepeatUntilDestroy <Unit>(Observable.TakeUntil <Unit, PointerEventData>(Observable.SkipUntil <Unit, PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable((Component)p.btn), (IObservable <M1>)Observable.Do <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerDownAsObservable((UIBehaviour)p.btn), (Action <M0>)(_ => { downTimeCnt = 0.0f; loopTimeCnt = 0.0f; change = false; }))), (IObservable <M1>)ObservableTriggerExtensions.OnPointerUpAsObservable((UIBehaviour)p.btn)), (Component)this), (Action <M0>)(_ => { int index = p.index / 2; float num1 = (p.index % 2 != 0 ? 1f : -1f) * this.moveRotValue[this.acsCtrlSetting.correctSetting[this.correctNo].rotRate]; float num2 = 0.0f; downTimeCnt += Time.get_deltaTime(); if ((double)downTimeCnt <= 0.300000011920929) { return; } for (loopTimeCnt += Time.get_deltaTime(); (double)loopTimeCnt > 0.0500000007450581; loopTimeCnt -= 0.05f) { num2 += num1; } if ((double)num2 == 0.0) { return; } this.chaCtrl.SetAccessoryRot(this.slotNo, this.correctNo, num2, true, flag[index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 1] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 1]; this.inpRot[index].set_text(((Vector3) ref this.nowAcs.parts[this.slotNo].addMove.Address(this.correctNo, 1)).get_Item(index).ToString()); change = true; this.SetControllerTransform(); })), (Component)this); this.lstDisposable.Add(disposable); })); // ISSUE: object of a compiler-generated type is created ((IEnumerable <InputField>) this.inpRot).Select <InputField, \u003C\u003E__AnonType14 <InputField, int> >((Func <InputField, int, \u003C\u003E__AnonType14 <InputField, int> >)((p, i) => new \u003C\u003E__AnonType14 <InputField, int>(p, i))).ToList <\u003C\u003E__AnonType14 <InputField, int> >().ForEach((Action <\u003C\u003E__AnonType14 <InputField, int> >)(p => { disposable = ObservableExtensions.Subscribe <string>(UnityEventExtensions.AsObservable <string>((UnityEvent <M0>)p.inp.get_onEndEdit()), (Action <M0>)(value => { int index = p.index % 3; float num = CustomBase.ConvertValueFromTextLimit(0.0f, 360f, 0, value); p.inp.set_text(num.ToString()); this.chaCtrl.SetAccessoryRot(this.slotNo, this.correctNo, num, false, flag[index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 1] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 1]; this.SetControllerTransform(); })); this.lstDisposable.Add(disposable); })); // ISSUE: object of a compiler-generated type is created ((IEnumerable <Button>) this.btnRotReset).Select <Button, \u003C\u003E__AnonType13 <Button, int> >((Func <Button, int, \u003C\u003E__AnonType13 <Button, int> >)((p, i) => new \u003C\u003E__AnonType13 <Button, int>(p, i))).ToList <\u003C\u003E__AnonType13 <Button, int> >().ForEach((Action <\u003C\u003E__AnonType13 <Button, int> >)(p => { disposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(p.btn), (Action <M0>)(_ => { this.inpRot[p.index].set_text("0"); this.chaCtrl.SetAccessoryRot(this.slotNo, this.correctNo, 0.0f, false, flag[p.index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 1] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 1]; this.SetControllerTransform(); })); this.lstDisposable.Add(disposable); })); // ISSUE: object of a compiler-generated type is created ((IEnumerable <Button>) this.btnScl).Select <Button, \u003C\u003E__AnonType13 <Button, int> >((Func <Button, int, \u003C\u003E__AnonType13 <Button, int> >)((p, i) => new \u003C\u003E__AnonType13 <Button, int>(p, i))).ToList <\u003C\u003E__AnonType13 <Button, int> >().ForEach((Action <\u003C\u003E__AnonType13 <Button, int> >)(p => { disposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(p.btn), (Action <M0>)(_ => { if (change) { return; } int index = p.index / 2; this.chaCtrl.SetAccessoryScl(this.slotNo, this.correctNo, (p.index % 2 != 0 ? 1f : -1f) * this.moveSclValue[this.acsCtrlSetting.correctSetting[this.correctNo].sclRate], true, flag[index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 2] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 2]; this.inpScl[index].set_text(((Vector3) ref this.nowAcs.parts[this.slotNo].addMove.Address(this.correctNo, 2)).get_Item(index).ToString()); })); this.lstDisposable.Add(disposable); disposable = (IDisposable)DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <Unit>(Observable.RepeatUntilDestroy <Unit>(Observable.TakeUntil <Unit, PointerEventData>(Observable.SkipUntil <Unit, PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable((Component)p.btn), (IObservable <M1>)Observable.Do <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerDownAsObservable((UIBehaviour)p.btn), (Action <M0>)(_ => { downTimeCnt = 0.0f; loopTimeCnt = 0.0f; change = false; }))), (IObservable <M1>)ObservableTriggerExtensions.OnPointerUpAsObservable((UIBehaviour)p.btn)), (Component)this), (Action <M0>)(_ => { int index = p.index / 2; float num1 = (p.index % 2 != 0 ? 1f : -1f) * this.moveSclValue[this.acsCtrlSetting.correctSetting[this.correctNo].sclRate]; float num2 = 0.0f; downTimeCnt += Time.get_deltaTime(); if ((double)downTimeCnt <= 0.300000011920929) { return; } for (loopTimeCnt += Time.get_deltaTime(); (double)loopTimeCnt > 0.0500000007450581; loopTimeCnt -= 0.05f) { num2 += num1; } if ((double)num2 == 0.0) { return; } this.chaCtrl.SetAccessoryScl(this.slotNo, this.correctNo, num2, true, flag[index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 2] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 2]; this.inpScl[index].set_text(((Vector3) ref this.nowAcs.parts[this.slotNo].addMove.Address(this.correctNo, 2)).get_Item(index).ToString()); change = true; })), (Component)this); this.lstDisposable.Add(disposable); })); // ISSUE: object of a compiler-generated type is created ((IEnumerable <InputField>) this.inpScl).Select <InputField, \u003C\u003E__AnonType14 <InputField, int> >((Func <InputField, int, \u003C\u003E__AnonType14 <InputField, int> >)((p, i) => new \u003C\u003E__AnonType14 <InputField, int>(p, i))).ToList <\u003C\u003E__AnonType14 <InputField, int> >().ForEach((Action <\u003C\u003E__AnonType14 <InputField, int> >)(p => { disposable = ObservableExtensions.Subscribe <string>(UnityEventExtensions.AsObservable <string>((UnityEvent <M0>)p.inp.get_onEndEdit()), (Action <M0>)(value => { int index = p.index % 3; float num = CustomBase.ConvertValueFromTextLimit(0.01f, 100f, 2, value); p.inp.set_text(num.ToString()); this.chaCtrl.SetAccessoryScl(this.slotNo, this.correctNo, num, false, flag[index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 2] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 2]; })); this.lstDisposable.Add(disposable); })); // ISSUE: object of a compiler-generated type is created ((IEnumerable <Button>) this.btnSclReset).Select <Button, \u003C\u003E__AnonType13 <Button, int> >((Func <Button, int, \u003C\u003E__AnonType13 <Button, int> >)((p, i) => new \u003C\u003E__AnonType13 <Button, int>(p, i))).ToList <\u003C\u003E__AnonType13 <Button, int> >().ForEach((Action <\u003C\u003E__AnonType13 <Button, int> >)(p => { disposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(p.btn), (Action <M0>)(_ => { this.inpScl[p.index].set_text("1"); this.chaCtrl.SetAccessoryScl(this.slotNo, this.correctNo, 1f, false, flag[p.index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 2] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 2]; })); this.lstDisposable.Add(disposable); })); disposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnAllReset), (Action <M0>)(_ => { for (int index = 0; index < 3; ++index) { this.inpPos[index].set_text("0"); this.chaCtrl.SetAccessoryPos(this.slotNo, this.correctNo, 0.0f, false, flag[index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 0] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 0]; this.SetControllerTransform(); this.inpRot[index].set_text("0"); this.chaCtrl.SetAccessoryRot(this.slotNo, this.correctNo, 0.0f, false, flag[index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 1] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 1]; this.SetControllerTransform(); this.inpScl[index].set_text("1"); this.chaCtrl.SetAccessoryScl(this.slotNo, this.correctNo, 1f, false, flag[index]); this.orgAcs.parts[this.slotNo].addMove[this.correctNo, 2] = this.nowAcs.parts[this.slotNo].addMove[this.correctNo, 2]; } })); this.lstDisposable.Add(disposable); disposable = ObservableExtensions.Subscribe <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(this.tglDrawCtrl), (Action <M0>)(isOn => this.customBase.customSettingSave.acsCtrlSetting.correctSetting[this.correctNo].draw = isOn)); this.lstDisposable.Add(disposable); if (((IEnumerable <Toggle>) this.tglCtrlType).Any <Toggle>()) { // ISSUE: object of a compiler-generated type is created ((IEnumerable <Toggle>) this.tglCtrlType).Select <Toggle, \u003C\u003E__AnonType15 <Toggle, int> >((Func <Toggle, int, \u003C\u003E__AnonType15 <Toggle, int> >)((val, idx) => new \u003C\u003E__AnonType15 <Toggle, int>(val, idx))).Where <\u003C\u003E__AnonType15 <Toggle, int> >((Func <\u003C\u003E__AnonType15 <Toggle, int>, bool>)(item => Object.op_Inequality((Object)item.val, (Object)null))).ToList <\u003C\u003E__AnonType15 <Toggle, int> >().ForEach((Action <\u003C\u003E__AnonType15 <Toggle, int> >)(item => { disposable = ObservableExtensions.Subscribe <bool>(Observable.Where <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(item.val), (Func <M0, bool>)(isOn => isOn)), (Action <M0>)(isOn => { this.customBase.customSettingSave.acsCtrlSetting.correctSetting[this.correctNo].type = item.idx; if (!Object.op_Implicit((Object)this.cmpGuid)) { return; } this.cmpGuid.SetMode(item.idx); })); this.lstDisposable.Add(disposable); })); } disposable = ObservableExtensions.Subscribe <float>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(this.sldCtrlSpeed), (Action <M0>)(val => { this.customBase.customSettingSave.acsCtrlSetting.correctSetting[this.correctNo].speed = val; if (!Object.op_Implicit((Object)this.cmpGuid)) { return; } this.cmpGuid.speedMove = val; })); this.lstDisposable.Add(disposable); disposable = ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnScrollAsObservable((UIBehaviour)this.sldCtrlSpeed), (Action <M0>)(scl => { if (!this.customBase.sliderControlWheel) { return; } this.sldCtrlSpeed.set_value(Mathf.Clamp(this.sldCtrlSpeed.get_value() + (float)(scl.get_scrollDelta().y * -0.00999999977648258), 0.1f, 1f)); })); this.lstDisposable.Add(disposable); disposable = ObservableExtensions.Subscribe <float>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(this.sldCtrlSize), (Action <M0>)(val => { this.customBase.customSettingSave.acsCtrlSetting.correctSetting[this.correctNo].scale = val; if (!Object.op_Implicit((Object)this.cmpGuid)) { return; } this.cmpGuid.scaleAxis = val; this.cmpGuid.UpdateScale(); })); this.lstDisposable.Add(disposable); disposable = ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnScrollAsObservable((UIBehaviour)this.sldCtrlSize), (Action <M0>)(scl => { if (!this.customBase.sliderControlWheel) { return; } this.sldCtrlSize.set_value(Mathf.Clamp(this.sldCtrlSize.get_value() + (float)(scl.get_scrollDelta().y * -0.00999999977648258), 0.3f, 3f)); })); this.lstDisposable.Add(disposable); this.UpdateDrawControllerState(); }
protected void LinkTmpDropdown(TMP_Dropdown dropdown, Action <float> act) { ObservableExtensions.Subscribe <int>(UnityEventExtensions.AsObservable <int>((UnityEvent <M0>)dropdown.get_onValueChanged()), (Action <M0>)(value => act((float)value))); ObservableExtensions.Subscribe <PointerEventData>(Observable.Where <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerDownAsObservable((UIBehaviour)dropdown), (Func <M0, bool>)(_ => Input.GetMouseButtonDown(0))), (Action <M0>)(_ => this.EnterSE())); }