public override void Init() { ActionSystem actData = Manager.Config.ActData; this.LinkToggleArray(this.lookToggles, (Action <int>)(i => actData.Look = i == 0)); this.LinkSlider(this.tpsSensitivityXSlider, (Action <float>)(value => actData.TPSSensitivityY = (int)value)); this.LinkSlider(this.tpsSensitivityYSlider, (Action <float>)(value => actData.TPSSensitivityX = (int)value)); this.LinkSlider(this.fpsSensitivityXSlider, (Action <float>)(value => actData.FPSSensitivityY = (int)value)); this.LinkSlider(this.fpsSensitivityYSlider, (Action <float>)(value => actData.FPSSensitivityX = (int)value)); this.LinkToggleArray(this.invertMoveXToggles, (Action <int>)(i => actData.InvertMoveY = i == 1)); this.LinkToggleArray(this.invertMoveYToggles, (Action <int>)(i => actData.InvertMoveX = i == 1)); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.tpsSensitivityXResetButton), (Action <M0>)(_ => this.tpsSensitivityXSlider.set_value(0.0f))); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.tpsSensitivityYResetButton), (Action <M0>)(_ => this.tpsSensitivityYSlider.set_value(0.0f))); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.fpsSensitivityXResetButton), (Action <M0>)(_ => this.fpsSensitivityXSlider.set_value(0.0f))); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.fpsSensitivityYResetButton), (Action <M0>)(_ => this.fpsSensitivityYSlider.set_value(0.0f))); ObservableExtensions.Subscribe <Unit>(Observable.Merge <Unit>((IObservable <M0>[]) new IObservable <Unit>[4] { UnityUIComponentExtensions.OnClickAsObservable(this.tpsSensitivityXResetButton), UnityUIComponentExtensions.OnClickAsObservable(this.tpsSensitivityYResetButton), UnityUIComponentExtensions.OnClickAsObservable(this.fpsSensitivityXResetButton), UnityUIComponentExtensions.OnClickAsObservable(this.fpsSensitivityYResetButton) }), (Action <M0>)(_ => this.EnterSE())); ObservableExtensions.Subscribe <PointerEventData>(Observable.Merge <PointerEventData>((IObservable <M0>[]) new IObservable <PointerEventData>[4] { ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this.tpsSensitivityXResetButton), ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this.tpsSensitivityYResetButton), ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this.fpsSensitivityXResetButton), ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this.fpsSensitivityYResetButton) }), (Action <M0>)(_ => Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Select))); }
protected override void Start() { base.Start(); if (Object.op_Inequality((Object)this._infoLayout, (Object)null)) { this._infoLayout.SetActive(true); } ((ReactiveProperty <bool>) this._active).set_Value(this.isOpen); ObservableExtensions.Subscribe <bool>((IObservable <M0>) this._active, (Action <M0>)(active => this.isCountViewerVisible = active)); ObservableExtensions.Subscribe <bool>((IObservable <M0>) this._active, (Action <M0>)(active => ((Component)this._submitButton).get_gameObject().SetActive(active))); UnityUIComponentExtensions.SubscribeToText <int>((IObservable <M0>) this._createSum, this._itemName, (Func <M0, string>)(i => { string str = string.Empty; if (i > 0) { str = string.Format(" x {0}", (object)i); } string itemName = this.itemName; if (itemName.IsNullOrEmpty()) { str = string.Empty; } return(string.Format("{0}{1}", (object)itemName, (object)str)); })); this._storageDisposable = ObservableExtensions.Subscribe <Unit>((IObservable <M0>)Observable.FromCoroutine((Func <CancellationToken, IEnumerator>)(_ => this.LoadStorageType()), false)); Text text = (Text)((Component)this._submitButton).GetComponentInChildren <Text>(); Color baseTextColor = ((Graphic)text).get_color(); ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this._submitButton), (Action <M0>)(_ => ((Graphic)text).set_color(Define.Get(Colors.Orange)))); ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerExitAsObservable((UIBehaviour)this._submitButton), (Action <M0>)(_ => ((Graphic)text).set_color(baseTextColor))); }
public AudioSource PlayEnviroSE(int clipID, int idx, float fadeTime = 0.0f) { List <SoundPack.Data2D> source; if (!this._env3DSEData.TryGetValue(clipID, out source) || source.IsNullOrEmpty <SoundPack.Data2D>() || (idx < 0 || source.Count <= idx)) { return((AudioSource)null); } SoundPack.Data2D data2D = source[idx]; AudioClip clip = this.Load((SoundPack.IData)data2D); if (Object.op_Equality((Object)clip, (Object)null)) { return((AudioSource)null); } AudioSource audioSource = Illusion.Game.Utils.Sound.Play(Manager.Sound.Type.ENV, clip, fadeTime); if (Object.op_Equality((Object)audioSource, (Object)null)) { return((AudioSource)null); } string bundle = data2D.AssetBundleName; string asset = data2D.AssetName; SoundPack.AddCountUsedEnviroSEInfo(bundle, asset, clip); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)ObservableTriggerExtensions.OnDestroyAsObservable((Component)audioSource), (System.Action <M0>)(_ => SoundPack.RemoveUsedEnviroSEInfo(bundle, asset))); return(audioSource); }
private void StartNewGame() { ObservableExtensions.Subscribe <string>((IObservable <M0>)UnityUIComponentExtensions.OnEndEditAsObservable(this.worldNameInput.input), (Action <M0>)(str => { if (str.IsNullOrEmpty()) { str = this.initWorldName; this.worldNameInput.input.set_text(str); } this.worldNameInput.textDummy.set_text(str); this.selectWorldData.Name = str; })); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnNewGameBack), (Action <M0>)(_ => this.BackToLoad())); ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this.btnNewGameBack), (Action <M0>)(_ => Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Select))); ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnNewGameEntry), (Func <M0, bool>)(_ => !Singleton <Scene> .Instance.IsFadeNow)), (Action <M0>)(_ => { Debug.Log((object)this.selectWorldData.Name); this.objNewGameRoot.SetActiveIfDifferent(false); ((UnityEngine.Component) this.lcwFemale).get_gameObject().SetActiveIfDifferent(true); this.lcwFemale.ReCreateList(true, true); Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.OK_L); })); ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this.btnNewGameEntry), (Action <M0>)(_ => Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Select))); ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable((UnityEngine.Component) this), (Func <M0, bool>)(_ => this.objNewGameRoot.get_activeSelf())), (Action <M0>)(_ => { bool isFocused = this.worldNameInput.input.get_isFocused(); this.worldNameInput.objDummy.SetActiveIfDifferent(!isFocused); ((Behaviour)this.worldNameInput.inputText).set_enabled(isFocused); })); }
private void Start() { if (Object.op_Implicit((Object)this.btnClose)) { ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnClose), (Action <M0>)(_ => { this.SetActiveCanvas(false); if (this.onClose == null) { return; } this.onClose(); })); } ObservableExtensions.Subscribe <Unit>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable((Component)this), (Action <M0>)(_ => { if (Object.op_Equality((Object)null, (Object)this.rtfScroll) || Object.op_Equality((Object)null, (Object)this.rtfContent) || (Object.op_Equality((Object)null, (Object)this.textLog) || this.sbAdd.Length == 0)) { return; } UnityEngine.UI.Text text = (UnityEngine.UI.Text)Object.Instantiate <UnityEngine.UI.Text>((M0)this.textLog); ((Component)text).get_transform().SetParent(((Component)this.rtfContent).get_transform(), false); text.set_text(this.sbAdd.ToString().TrimEnd('\r', '\n')); ((Graphic)text).get_rectTransform().set_sizeDelta(new Vector2((float)((Graphic)text).get_rectTransform().get_sizeDelta().x, text.get_preferredHeight())); ((Component)text).get_gameObject().SetActive(true); this.sbAdd.Length = 0; })); }
protected override void OnBeforeStart() { base.OnBeforeStart(); ObservableExtensions.Subscribe <bool>(Observable.TakeUntilDestroy <bool>((IObservable <M0>) this.OnActiveChangedAsObservable(), (Component)this), (Action <M0>)(x => this.SetActiveControl(x))); ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>(Observable.Where <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this._closeButton), (Func <M0, bool>)(_ => this.InputEnabled)), (Func <M0, bool>)(_ => this.IsActiveControl)), (Action <M0>)(_ => this.DoClose())); ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this._sortButton), (Func <M0, bool>)(_ => this.InputEnabled)), (Action <M0>)(_ => this._sortUI.IsActiveControl = !this._sortUI.IsActiveControl)); ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this._setButton), (Func <M0, bool>)(_ => this.InputEnabled)), (Action <M0>)(_ => this.DoSetAudio())); ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this._rightButton), (Func <M0, bool>)(_ => this.InputEnabled)), (Action <M0>)(_ => this.DoMove(1))); ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this._leftButton), (Func <M0, bool>)(_ => this.InputEnabled)), (Action <M0>)(_ => this.DoMove(-1))); ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this._playButton), (Func <M0, bool>)(_ => this.InputEnabled)), (Action <M0>)(_ => this.DoPlay())); ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this._pauseButton), (Func <M0, bool>)(_ => this.InputEnabled)), (Action <M0>)(_ => this.AudioStop())); ObservableExtensions.Subscribe <bool>(Observable.Where <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(this._sortToggle), (Func <M0, bool>)(_ => this.InputEnabled)), (Action <M0>)(_ => this.ListSort())); if (Object.op_Inequality((Object)((Selectable)this._sortToggle).get_targetGraphic(), (Object)null)) { ObservableExtensions.Subscribe <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(this._sortToggle), (Action <M0>)(isOn => ((Behaviour)((Selectable)this._sortToggle).get_targetGraphic()).set_enabled(!isOn))); } this._sortUI.ToggleIndexChanged = (Action <int>)(x => this.ListSort()); if (!Object.op_Inequality((Object)this._sortSelectedImage, (Object)null)) { return; } ((Behaviour)this._sortSelectedImage).set_enabled(false); ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this._sortToggle), (Action <M0>)(_ => ((Behaviour)this._sortSelectedImage).set_enabled(true))); ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerExitAsObservable((UIBehaviour)this._sortToggle), (Action <M0>)(_ => ((Behaviour)this._sortSelectedImage).set_enabled(false))); }
private void SoundPlay(Transform root) { this._isPlay = true; List <EnvArea3DSE.IPlayInfo> playList = EnvArea3DSE.PlayAudioSourceList; playList.RemoveAll((Predicate <EnvArea3DSE.IPlayInfo>)(ax => ax == null || Object.op_Equality((Object)ax.Audio, (Object)null) || Object.op_Equality((Object)((Component)ax.Audio).get_gameObject(), (Object)null))); SoundPack.SoundSystemInfoGroup soundSystemInfo = Singleton <Resources> .Instance.SoundPack.SoundSystemInfo; if (soundSystemInfo.EnviroSEMaxCount <= playList.Count) { bool flag = true; int num = playList.Count - soundSystemInfo.EnviroSEMaxCount + 1; List <EnvArea3DSE.IPlayInfo> playInfoList = ListPool <EnvArea3DSE.IPlayInfo> .Get(); playInfoList.AddRange((IEnumerable <EnvArea3DSE.IPlayInfo>)playList); Transform cameraT = ((Component)Singleton <Manager.Map> .Instance.Player.CameraControl.CameraComponent).get_transform(); playInfoList.Sort((Comparison <EnvArea3DSE.IPlayInfo>)((a1, a2) => this.GetSqrDistanceSort(cameraT, ((Component)a2.Audio).get_transform(), ((Component)a1.Audio).get_transform()))); float distanceFromCamera = this.GetSqrDistanceFromCamera(cameraT, root); for (int index = 0; index < num; ++index) { EnvArea3DSE.IPlayInfo element = playInfoList.GetElement <EnvArea3DSE.IPlayInfo>(index); if ((double)distanceFromCamera < (double)element.GetSqrDistanceFromCamera(cameraT, ((Component)element.Audio).get_transform().get_position())) { element.Stop(); flag = false; } } ListPool <EnvArea3DSE.IPlayInfo> .Release(playInfoList); if (flag) { return; } } float fadeTime = 0.0f; if (this._firstPlaying) { fadeTime = !this._setFirstFadeTime ? Singleton <Resources> .Instance.SoundPack.EnviroInfo.FadeTime : this._firstFadeTime; this._firstPlaying = false; } this._audio = Singleton <Resources> .Instance.SoundPack.PlayEnviroSE(this._clipID, fadeTime); if (Object.op_Equality((Object)this._audio, (Object)null)) { Object.Destroy((Object)this); } else { this._fadePlayer = (FadePlayer)((Component)this._audio).GetComponentInChildren <FadePlayer>(true); this._audio.set_loop(this._isLoop); this._audio.set_minDistance((float)this._decay.x); this._audio.set_maxDistance((float)this._decay.y); if (!playList.Contains((EnvArea3DSE.IPlayInfo) this)) { playList.Add((EnvArea3DSE.IPlayInfo) this); } ObservableExtensions.Subscribe <Unit>((IObservable <M0>)ObservableTriggerExtensions.OnDestroyAsObservable((Component)this._audio), (Action <M0>)(_ => playList.Remove((EnvArea3DSE.IPlayInfo) this))); } }
protected override void Start() { base.Start(); this.customBase.actUpdateCvsAcsCopy += new Action(((CvsBase)this).UpdateCustomUI); this.tglDst[this.selDst].set_isOn(true); this.tglSrc[this.selSrc].set_isOn(true); // ISSUE: object of a compiler-generated type is created ((IEnumerable <UI_ToggleEx>) this.tglSrc).Select <UI_ToggleEx, \u003C\u003E__AnonType9 <UI_ToggleEx, int> >((Func <UI_ToggleEx, int, \u003C\u003E__AnonType9 <UI_ToggleEx, int> >)((p, index) => new \u003C\u003E__AnonType9 <UI_ToggleEx, int>(p, index))).ToList <\u003C\u003E__AnonType9 <UI_ToggleEx, int> >().ForEach((Action <\u003C\u003E__AnonType9 <UI_ToggleEx, int> >)(p => ObservableExtensions.Subscribe <bool>(Observable.Where <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable((Toggle)p.tgl), (Func <M0, bool>)(isOn => isOn)), (Action <M0>)(isOn => this.selSrc = p.index)))); // ISSUE: object of a compiler-generated type is created ((IEnumerable <UI_ToggleEx>) this.tglDst).Select <UI_ToggleEx, \u003C\u003E__AnonType9 <UI_ToggleEx, int> >((Func <UI_ToggleEx, int, \u003C\u003E__AnonType9 <UI_ToggleEx, int> >)((p, index) => new \u003C\u003E__AnonType9 <UI_ToggleEx, int>(p, index))).ToList <\u003C\u003E__AnonType9 <UI_ToggleEx, int> >().ForEach((Action <\u003C\u003E__AnonType9 <UI_ToggleEx, int> >)(p => ObservableExtensions.Subscribe <bool>(Observable.Where <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable((Toggle)p.tgl), (Func <M0, bool>)(isOn => isOn)), (Action <M0>)(isOn => this.selDst = p.index)))); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnCopySlot), (Action <M0>)(_ => { this.CopyAccessory(); Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.OK_S); })); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable((Component)this.btnCopySlot), (Action <M0>)(_ => ((Selectable)this.btnCopySlot).set_interactable(this.selSrc != this.selDst))); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnCopy01), (Action <M0>)(_ => { for (int index = 0; index < 3; ++index) { this.nowAcs.parts[this.selDst].addMove[0, index] = this.orgAcs.parts[this.selDst].addMove[0, index] = this.nowAcs.parts[this.selSrc].addMove[0, index]; } this.chaCtrl.UpdateAccessoryMoveFromInfo(this.selDst); this.customBase.updateCvsAccessory = true; Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.OK_S); })); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable((Component)this.btnCopy01), (Action <M0>)(_ => ((Selectable)this.btnCopy01).set_interactable(((((true ? 1 : 0) & (!Object.op_Inequality((Object)null, (Object)this.chaCtrl.cmpAccessory[this.selDst]) ? 0 : (Object.op_Inequality((Object)null, (Object)this.chaCtrl.cmpAccessory[this.selDst].trfMove01) ? 1 : 0))) != 0 ? 1 : 0) & (!Object.op_Inequality((Object)null, (Object)this.chaCtrl.cmpAccessory[this.selSrc]) ? 0 : (Object.op_Inequality((Object)null, (Object)this.chaCtrl.cmpAccessory[this.selSrc].trfMove01) ? 1 : 0))) != 0 & this.selSrc != this.selDst))); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnCopy02), (Action <M0>)(_ => { for (int index = 0; index < 3; ++index) { this.nowAcs.parts[this.selDst].addMove[1, index] = this.orgAcs.parts[this.selDst].addMove[1, index] = this.nowAcs.parts[this.selSrc].addMove[1, index]; } this.chaCtrl.UpdateAccessoryMoveFromInfo(this.selDst); this.customBase.updateCvsAccessory = true; Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.OK_S); })); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable((Component)this.btnCopy02), (Action <M0>)(_ => ((Selectable)this.btnCopy02).set_interactable(((((true ? 1 : 0) & (!Object.op_Inequality((Object)null, (Object)this.chaCtrl.cmpAccessory[this.selDst]) ? 0 : (Object.op_Inequality((Object)null, (Object)this.chaCtrl.cmpAccessory[this.selDst].trfMove02) ? 1 : 0))) != 0 ? 1 : 0) & (!Object.op_Inequality((Object)null, (Object)this.chaCtrl.cmpAccessory[this.selSrc]) ? 0 : (Object.op_Inequality((Object)null, (Object)this.chaCtrl.cmpAccessory[this.selSrc].trfMove02) ? 1 : 0))) != 0 & this.selSrc != this.selDst))); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnRevLR01), (Action <M0>)(_ => { for (int index = 0; index < 3; ++index) { Vector3 vector3 = this.nowAcs.parts[this.selSrc].addMove[0, index]; if (index == 1) { ref Vector3 local1 = ref vector3; local1.y = (__Null)(local1.y + 180.0); if (vector3.y >= 360.0) { ref Vector3 local2 = ref vector3; local2.y = (__Null)(local2.y - 360.0); } } this.nowAcs.parts[this.selDst].addMove[0, index] = this.orgAcs.parts[this.selDst].addMove[0, index] = vector3; }
private void Start() { List <Color> baseTextMeshColor = ((IEnumerable <TextMeshProUGUI>) this.targetTextMesh).Select <TextMeshProUGUI, Color>((Func <TextMeshProUGUI, Color>)(t => ((Graphic)t).get_color())).ToList <Color>(); List <Color> baseTextColor = ((IEnumerable <Text>) this.targetText).Select <Text, Color>((Func <Text, Color>)(t => ((Graphic)t).get_color())).ToList <Color>(); List <Color> baseImageColor = ((IEnumerable <Image>) this.targetImage).Select <Image, Color>((Func <Image, Color>)(t => ((Graphic)t).get_color())).ToList <Color>(); Color[] baseRawImageColor = ((IEnumerable <RawImage>) this.targetRawImage).Select <RawImage, Color>((Func <RawImage, Color>)(t => ((Graphic)t).get_color())).ToArray <Color>(); BoolReactiveProperty isInteract = new BoolReactiveProperty(((Selectable)this.flagButton).get_interactable()); ObservableExtensions.Subscribe <bool>((IObservable <M0>)isInteract, (Action <M0>)(isOn => { ColorBlock colors = ((Selectable)this.flagButton).get_colors(); List <Color> colorList1 = new List <Color>((IEnumerable <Color>)baseTextMeshColor); List <Color> colorList2 = new List <Color>((IEnumerable <Color>)baseTextColor); List <Color> colorList3 = new List <Color>((IEnumerable <Color>)baseImageColor); List <Color> colorList4 = new List <Color>((IEnumerable <Color>)baseRawImageColor); if (!isOn) { for (int index = 0; index < this.targetTextMesh.Count; ++index) { colorList1[index] = new Color(Mathf.Clamp01((float)(colorList1[index].r * ((ColorBlock) ref colors).get_disabledColor().r)), Mathf.Clamp01((float)(colorList1[index].g * ((ColorBlock) ref colors).get_disabledColor().g)), Mathf.Clamp01((float)(colorList1[index].b * ((ColorBlock) ref colors).get_disabledColor().b)), Mathf.Clamp01((float)(colorList1[index].a * ((ColorBlock) ref colors).get_disabledColor().a))); } for (int index = 0; index < this.targetText.Count; ++index) { colorList2[index] = new Color(Mathf.Clamp01((float)(colorList2[index].r * ((ColorBlock) ref colors).get_disabledColor().r)), Mathf.Clamp01((float)(colorList2[index].g * ((ColorBlock) ref colors).get_disabledColor().g)), Mathf.Clamp01((float)(colorList2[index].b * ((ColorBlock) ref colors).get_disabledColor().b)), Mathf.Clamp01((float)(colorList2[index].a * ((ColorBlock) ref colors).get_disabledColor().a))); } for (int index = 0; index < this.targetImage.Count; ++index) { colorList3[index] = new Color(Mathf.Clamp01((float)(colorList3[index].r * ((ColorBlock) ref colors).get_disabledColor().r)), Mathf.Clamp01((float)(colorList3[index].g * ((ColorBlock) ref colors).get_disabledColor().g)), Mathf.Clamp01((float)(colorList3[index].b * ((ColorBlock) ref colors).get_disabledColor().b)), Mathf.Clamp01((float)(colorList3[index].a * ((ColorBlock) ref colors).get_disabledColor().a))); } for (int index = 0; index < this.targetRawImage.Count; ++index) { colorList4[index] = new Color(Mathf.Clamp01((float)(colorList4[index].r * ((ColorBlock) ref colors).get_disabledColor().r)), Mathf.Clamp01((float)(colorList4[index].g * ((ColorBlock) ref colors).get_disabledColor().g)), Mathf.Clamp01((float)(colorList4[index].b * ((ColorBlock) ref colors).get_disabledColor().b)), Mathf.Clamp01((float)(colorList4[index].a * ((ColorBlock) ref colors).get_disabledColor().a))); } } for (int index = 0; index < this.targetTextMesh.Count; ++index) { ((Graphic)this.targetTextMesh[index]).set_color(colorList1[index]); } for (int index = 0; index < this.targetText.Count; ++index) { ((Graphic)this.targetText[index]).set_color(colorList2[index]); } for (int index = 0; index < this.targetImage.Count; ++index) { ((Graphic)this.targetImage[index]).set_color(colorList3[index]); } for (int index = 0; index < this.targetRawImage.Count; ++index) { ((Graphic)this.targetRawImage[index]).set_color(colorList4[index]); } })); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)ObservableTriggerExtensions.OnEnableAsObservable((UnityEngine.Component) this), (Action <M0>)(_ => ((ReactiveProperty <bool>)isInteract).set_Value(((Selectable)this.flagButton).get_interactable()))); ObservableExtensions.Subscribe <bool>(Observable.DistinctUntilChanged <bool>((IObservable <M0>)Observable.Select <Unit, bool>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable((UnityEngine.Component) this), (Func <M0, M1>)(_ => ((Selectable)this.flagButton).get_interactable()))), (Action <M0>)(interactable => ((ReactiveProperty <bool>)isInteract).set_Value(interactable))); }
public void Start() { ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnShowWinSort), (Action <M0>)(_ => this.winSort.objWinSort.SetActiveIfDifferent(!this.winSort.objWinSort.get_activeSelf()))); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.winSort.btnCloseWinSort), (Action <M0>)(_ => this.winSort.objWinSort.SetActiveIfDifferent(false))); if (((IEnumerable <Toggle>) this.winSort.tglSort).Any <Toggle>()) { // ISSUE: object of a compiler-generated type is created ((IEnumerable <Toggle>) this.winSort.tglSort).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>)(tgl => Object.op_Inequality((Object)tgl.val, (Object)null))).ToList <\u003C\u003E__AnonType15 <Toggle, int> >().ForEach((Action <\u003C\u003E__AnonType15 <Toggle, int> >)(tgl => ObservableExtensions.Subscribe <bool>(Observable.Where <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(tgl.val), (Func <M0, bool>)(isOn => isOn)), (Action <M0>)(isOn => this.sortType = tgl.idx)))); } ObservableExtensions.Subscribe <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(this.tglSortOrder), (Action <M0>)(isOn => this.sortOrder = !isOn ? 1 : 0)); ObservableExtensions.Subscribe <int>((IObservable <M0>) this._sortType, (Action <M0>)(_ => this.Sort())); ObservableExtensions.Subscribe <int>((IObservable <M0>) this._sortOrder, (Action <M0>)(_ => this.Sort())); if (this.button == null || this.button.Length != 3) { return; } if (Object.op_Implicit((Object)this.button[0])) { ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.button[0]), (Action <M0>)(_ => { if (this.onClick01 == null) { return; } this.onClick01(this.cscClothes.selectInfo?.info); })); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable((Component)this.button[0]), (Action <M0>)(_ => ((Selectable)this.button[0]).set_interactable((!this.btnDisableNotSelect01 ? 0 : (null == this.cscClothes.selectInfo ? 1 : 0)) == 0))); } if (Object.op_Implicit((Object)this.button[1])) { ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.button[1]), (Action <M0>)(_ => { if (this.onClick02 == null) { return; } this.onClick02(this.cscClothes.selectInfo?.info); })); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable((Component)this.button[1]), (Action <M0>)(_ => ((Selectable)this.button[1]).set_interactable((!this.btnDisableNotSelect02 ? 0 : (null == this.cscClothes.selectInfo ? 1 : 0)) == 0))); } if (!Object.op_Implicit((Object)this.button[2])) { return; } ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.button[2]), (Action <M0>)(_ => { if (this.onClick03 == null) { return; } this.onClick03(this.cscClothes.selectInfo?.info); })); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable((Component)this.button[2]), (Action <M0>)(_ => ((Selectable)this.button[2]).set_interactable((!this.btnDisableNotSelect03 ? 0 : (null == this.cscClothes.selectInfo ? 1 : 0)) == 0))); }
private void Start() { this.cgrp.set_alpha(0.0f); this.cgrp.set_blocksRaycasts(false); this.active = false; ObservableExtensions.Subscribe <Unit>((IObservable <M0>)ObservableTriggerExtensions.OnDestroyAsObservable((Component)this), (Action <M0>)(_ => { this.disposables.Clear(); this.cgrp.set_alpha(0.0f); this.cgrp.set_blocksRaycasts(false); this.active = false; })); }
private void Start() { this.customBase.lstInputField.Add(this.inpName); if (!Object.op_Inequality((Object)null, (Object)this.inpName)) { return; } ObservableExtensions.Subscribe <string>((IObservable <M0>)UnityUIComponentExtensions.OnEndEditAsObservable(this.inpName), (Action <M0>)(buf => { if (!Object.op_Inequality((Object)null, (Object)this.textNameDummy)) { return; } this.textNameDummy.set_text(this.inpName.get_text()); })); if (Object.op_Inequality((Object)null, (Object)this.objNameDummy)) { ObservableExtensions.Subscribe <Unit>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable(this.objNameDummy), (Action <M0>)(_ => { bool isFocused = this.inpName.get_isFocused(); if (this.objNameDummy.get_activeSelf() != isFocused) { return; } this.objNameDummy.SetActiveIfDifferent(!isFocused); })); } if (Object.op_Inequality((Object)null, (Object)this.btnBack)) { ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnBack), (Action <M0>)(_ => { Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Cancel); this.customBase.customCtrl.showInputCoordinate = false; })); } if (!Object.op_Inequality((Object)null, (Object)this.btnEntry)) { return; } ObservableExtensions.Subscribe <Unit>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable((Component)this.btnEntry), (Action <M0>)(_ => ((Selectable)this.btnEntry).set_interactable(!this.inpName.get_text().IsNullOrEmpty()))); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnEntry), (Action <M0>)(_ => { Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Save); this.customBase.customCtrl.showInputCoordinate = false; if (this.actEntry == null) { return; } this.actEntry(this.inpName.get_text()); })); }
public AudioSource Play(SoundPack.IData data, Manager.Sound.Type type, float fadeTime = 0.0f) { AudioClip clip = this.Load(data); if (Object.op_Equality((Object)clip, (Object)null)) { return((AudioSource)null); } AudioSource audio = Illusion.Game.Utils.Sound.Play(type, clip, fadeTime); if (type == Manager.Sound.Type.GameSE3D && Object.op_Inequality((Object)audio, (Object)null)) { this.PlayingAudioList.RemoveAll((Predicate <AudioSource>)(x => Object.op_Equality((Object)x, (Object)null) || Object.op_Equality((Object)((Component)x).get_gameObject(), (Object)null))); if (this._soundSystemInfo.Game3DMaxCount <= this.PlayingAudioList.Count) { int num = this.PlayingAudioList.Count - this._soundSystemInfo.Game3DMaxCount + 1; Transform cameraT = ((Component)Singleton <Manager.Map> .Instance.Player.CameraControl.CameraComponent).get_transform(); List <AudioSource> audioSourceList = ListPool <AudioSource> .Get(); audioSourceList.AddRange((IEnumerable <AudioSource>) this.PlayingAudioList); audioSourceList.Sort((Comparison <AudioSource>)((a1, a2) => this.GetSqrDistanceSort(cameraT, ((Component)a2).get_transform(), ((Component)a1).get_transform()))); for (int index = 0; index < num; ++index) { AudioSource element = audioSourceList.GetElement <AudioSource>(index); this.PlayingAudioList.Remove(element); Object.Destroy((Object)((Component)element).get_gameObject()); } ListPool <AudioSource> .Release(audioSourceList); } ObservableExtensions.Subscribe <Unit>((IObservable <M0>)ObservableTriggerExtensions.OnDestroyAsObservable((Component)audio), (System.Action <M0>)(_ => { if (!Object.op_Inequality((Object)audio, (Object)null)) { return; } this.PlayingAudioList.Remove(audio); })); this.PlayingAudioList.Add(audio); } if (data is SoundPack.Data3D data3D) { audio.set_minDistance(data3D.MinDistance); audio.set_maxDistance(data3D.MaxDistance); } return(audio); }
protected override void Start() { base.Start(); this.customBase.actUpdateCvsFusion += new Action(((CvsBase)this).UpdateCustomUI); this.UpdateCharasList(); if (Object.op_Inequality((Object)null, (Object)this.btnFusion)) { ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnFusion), (Action <M0>)(_ => { this.FusionProc(this.charaLoadWinA.GetSelectInfo().info.FileName, this.charaLoadWinB.GetSelectInfo().info.FileName); this.isFusion = true; })); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable((Component)this.btnFusion), (Action <M0>)(_ => { CustomCharaScrollController.ScrollData selectInfo1 = this.charaLoadWinA.GetSelectInfo(); CustomCharaScrollController.ScrollData selectInfo2 = this.charaLoadWinB.GetSelectInfo(); ((Selectable)this.btnFusion).set_interactable(selectInfo1 != null && null != selectInfo2); })); } if (!Object.op_Inequality((Object)null, (Object)this.btnExit)) { return; } ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnExit), (Action <M0>)(_ => { this.customBase.customCtrl.showFusionCvs = false; this.customBase.customCtrl.showMainCvs = true; this.charaLoadWinA.SelectInfoClear(); this.charaLoadWinB.SelectInfoClear(); if (this.isFusion) { this.customBase.updateCustomUI = true; for (int slotNo = 0; slotNo < 20; ++slotNo) { this.customBase.ChangeAcsSlotName(slotNo); } this.customBase.SetUpdateToggleSetting(); this.customBase.forceUpdateAcsList = true; } this.isFusion = false; })); }
private void Awake() { ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)ObservableTriggerExtensions.LateUpdateAsObservable((Component)this), (Func <M0, bool>)(_ => this.isForceLoop)), (Action <M0>)(_ => { AnimatorStateInfo animatorStateInfo = this.animator.GetCurrentAnimatorStateInfo(0); if (((AnimatorStateInfo) ref animatorStateInfo).get_loop() || (double)((AnimatorStateInfo) ref animatorStateInfo).get_normalizedTime() < 1.0) { return; } this.animator.Play(this.nameHadh, 0, 0.0f); })); ObservableExtensions.Subscribe <Unit>((IObservable <M0>)ObservableTriggerExtensions.LateUpdateAsObservable((Component)this), (Action <M0>)(_ => { if (!this.isSon || !Object.op_Implicit((Object)this.transSon)) { return; } this.transSon.set_localScale(new Vector3(this.oiCharInfo.sonLength, this.oiCharInfo.sonLength, this.oiCharInfo.sonLength)); })); }
private void StartLoad() { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type TitleLoadScene.\u003CStartLoad\u003Ec__AnonStorey1 loadCAnonStorey1 = new TitleLoadScene.\u003CStartLoad\u003Ec__AnonStorey1(); // ISSUE: reference to a compiler-generated field loadCAnonStorey1.\u0024this = this; // ISSUE: reference to a compiler-generated field loadCAnonStorey1.isAutoFileExists = Singleton <Game> .Instance.Data.AutoData != null; // ISSUE: reference to a compiler-generated field this.infoAutoItem.objSave.SetActiveIfDifferent(loadCAnonStorey1.isAutoFileExists); // ISSUE: reference to a compiler-generated field this.infoAutoItem.objInitialize.SetActiveIfDifferent(!loadCAnonStorey1.isAutoFileExists); // ISSUE: reference to a compiler-generated field if (loadCAnonStorey1.isAutoFileExists) { this.infoAutoItem.txtTitle.set_text(Singleton <Game> .Instance.Data.AutoData.Name); this.infoAutoItem.txtDay.set_text(Singleton <Game> .Instance.Data.AutoData.SaveTime.ToShortDateString()); this.infoAutoItem.txtTime.set_text(Singleton <Game> .Instance.Data.AutoData.SaveTime.ToLongTimeString()); } // ISSUE: reference to a compiler-generated field ((Selectable)this.infoAutoItem.btnEntry).set_interactable(loadCAnonStorey1.isAutoFileExists); // ISSUE: reference to a compiler-generated field this.infoAutoItem.isData = loadCAnonStorey1.isAutoFileExists; this.infoAutoItem.num = 0; // ISSUE: method pointer this.infoAutoItem.action.listActionEnter.Add(new UnityAction((object)loadCAnonStorey1, __methodptr(\u003C\u003Em__0))); // ISSUE: method pointer this.infoAutoItem.action.listActionExit.Add(new UnityAction((object)loadCAnonStorey1, __methodptr(\u003C\u003Em__1))); // ISSUE: reference to a compiler-generated method ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.infoAutoItem.btnEntry), (Action <M0>) new Action <Unit>(loadCAnonStorey1.\u003C\u003Em__2)); // ISSUE: reference to a compiler-generated method UnityUIComponentExtensions.SubscribeToInteractable((IObservable <bool>)ObserveExtensions.ObserveEveryValueChanged <TitleLoadScene, bool>((M0)this, (Func <M0, M1>) new Func <TitleLoadScene, bool>(loadCAnonStorey1.\u003C\u003Em__3), (FrameCountType)0, false), (Selectable)this.infoAutoItem.btnEntry); this.lstSaveInfo.Clear(); this.lstSaveInfo.Add(this.infoAutoItem); List <Transform> transformList = new List <Transform>(); for (int index = 0; index < this.objSaveContentParent.get_transform().get_childCount(); ++index) { transformList.Add(this.objSaveContentParent.get_transform().GetChild(index)); } this.objSaveContentParent.get_transform().DetachChildren(); using (List <Transform> .Enumerator enumerator = transformList.GetEnumerator()) { while (enumerator.MoveNext()) { Object.Destroy((Object)enumerator.Current); } } for (int key = 0; key < this.drawFileNum; ++key) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type TitleLoadScene.\u003CStartLoad\u003Ec__AnonStorey2 loadCAnonStorey2 = new TitleLoadScene.\u003CStartLoad\u003Ec__AnonStorey2(); // ISSUE: reference to a compiler-generated field loadCAnonStorey2.\u003C\u003Ef__ref\u00241 = loadCAnonStorey1; GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.nodeSaveButton); gameObject.get_transform().SetParent(this.objSaveContentParent.get_transform(), false); // ISSUE: reference to a compiler-generated field loadCAnonStorey2.info = (TitleSaveItemInfo)gameObject.GetComponent <TitleSaveItemInfo>(); // ISSUE: reference to a compiler-generated field if (!Object.op_Implicit((Object)loadCAnonStorey2.info)) { Object.Destroy((Object)gameObject); } else { // ISSUE: reference to a compiler-generated field loadCAnonStorey2.isFileExists = Singleton <Game> .Instance.Data.WorldList.ContainsKey(key); // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field loadCAnonStorey2.info.objSave.SetActiveIfDifferent(loadCAnonStorey2.isFileExists); // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field loadCAnonStorey2.info.objInitialize.SetActiveIfDifferent(!loadCAnonStorey2.isFileExists); // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field loadCAnonStorey2.info.isData = loadCAnonStorey2.isFileExists; // ISSUE: reference to a compiler-generated field loadCAnonStorey2.info.num = key + 1; // ISSUE: reference to a compiler-generated field if (loadCAnonStorey2.isFileExists) { WorldData world = Singleton <Game> .Instance.Data.WorldList[key]; // ISSUE: reference to a compiler-generated field loadCAnonStorey2.info.txtTitle.set_text(world.Name); // ISSUE: reference to a compiler-generated field loadCAnonStorey2.info.txtDay.set_text(world.SaveTime.ToShortDateString()); // ISSUE: reference to a compiler-generated field loadCAnonStorey2.info.txtTime.set_text(world.SaveTime.ToLongTimeString()); } // ISSUE: reference to a compiler-generated field // ISSUE: method pointer loadCAnonStorey2.info.action.listActionEnter.Add(new UnityAction((object)loadCAnonStorey2, __methodptr(\u003C\u003Em__0))); // ISSUE: reference to a compiler-generated field // ISSUE: method pointer loadCAnonStorey2.info.action.listActionExit.Add(new UnityAction((object)loadCAnonStorey2, __methodptr(\u003C\u003Em__1))); // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated method ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(loadCAnonStorey2.info.btnEntry), (Action <M0>) new Action <Unit>(loadCAnonStorey2.\u003C\u003Em__2)); // ISSUE: reference to a compiler-generated field UnityUIComponentExtensions.SubscribeToInteractable((IObservable <bool>)ObserveExtensions.ObserveEveryValueChanged <TitleLoadScene, bool>((M0)this, (Func <M0, M1>)(_ => !Singleton <Scene> .Instance.IsNowLoadingFade), (FrameCountType)0, false), (Selectable)loadCAnonStorey2.info.btnEntry); // ISSUE: reference to a compiler-generated field this.lstSaveInfo.Add(loadCAnonStorey2.info); } } // ISSUE: reference to a compiler-generated method ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnLoadUIClose), (Action <M0>) new Action <Unit>(loadCAnonStorey1.\u003C\u003Em__4)); ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this.btnLoadUIClose), (Action <M0>)(_ => Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Select))); IObservable <Unit> observable1 = (IObservable <Unit>)Observable.Where <Unit>(Observable.Where <Unit>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable((UnityEngine.Component) this), (Func <M0, bool>)(_ => Object.op_Equality((Object)Singleton <Game> .Instance.ExitScene, (Object)null) && Object.op_Equality((Object)Singleton <Game> .Instance.Config, (Object)null))), (Func <M0, bool>)(_ => !Singleton <Scene> .Instance.IsNowLoadingFade)); IObservable <Unit> observable2 = (IObservable <Unit>)Observable.Where <Unit>((IObservable <M0>)observable1, (Func <M0, bool>)(_ => Input.GetMouseButtonDown(1))); // ISSUE: reference to a compiler-generated method // ISSUE: reference to a compiler-generated method // ISSUE: reference to a compiler-generated method ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>(Observable.Where <Unit>((IObservable <M0>)observable2, (Func <M0, bool>) new Func <Unit, bool>(loadCAnonStorey1.\u003C\u003Em__5)), (Func <M0, bool>) new Func <Unit, bool>(loadCAnonStorey1.\u003C\u003Em__6)), (Action <M0>) new Action <Unit>(loadCAnonStorey1.\u003C\u003Em__7)); // ISSUE: reference to a compiler-generated method // ISSUE: reference to a compiler-generated method ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)observable2, (Func <M0, bool>) new Func <Unit, bool>(loadCAnonStorey1.\u003C\u003Em__8)), (Action <M0>) new Action <Unit>(loadCAnonStorey1.\u003C\u003Em__9)); // ISSUE: reference to a compiler-generated method // ISSUE: reference to a compiler-generated method ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)observable2, (Func <M0, bool>) new Func <Unit, bool>(loadCAnonStorey1.\u003C\u003Em__A)), (Action <M0>) new Action <Unit>(loadCAnonStorey1.\u003C\u003Em__B)); // ISSUE: reference to a compiler-generated method // ISSUE: reference to a compiler-generated method ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>(Observable.Where <Unit>((IObservable <M0>)observable1, (Func <M0, bool>) new Func <Unit, bool>(loadCAnonStorey1.\u003C\u003Em__C)), (Func <M0, bool>)(_ => Input.GetKeyDown((KeyCode)(int)sbyte.MaxValue))), (Action <M0>) new Action <Unit>(loadCAnonStorey1.\u003C\u003Em__D)); }
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())); } }
public void Init() { if (this.isInit) { return; } DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <PointerEventData>(Observable.TakeUntilDestroy <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this.button), (Component)this.imageCursor), (Action <M0>)(_ => ((Behaviour)this.imageCursor).set_enabled(true))), this.gameObject); DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <PointerEventData>(Observable.TakeUntilDestroy <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerExitAsObservable((UIBehaviour)this.button), (Component)this.imageCursor), (Action <M0>)(_ => ((Behaviour)this.imageCursor).set_enabled(false))), this.gameObject); this.isInit = true; }
protected override void Start() { if (Object.op_Equality((Object)this._countViewer, (Object)null)) { ((MonoBehaviour)this).StartCoroutine(this.LoadCountViewer()); } ObservableExtensions.Subscribe <bool>((IObservable <M0>) this.OnActiveChangedAsObservable(), (Action <M0>)(x => this.SetActiveControl(x))); ObservableExtensions.Subscribe <ItemNodeUI>((IObservable <M0>) this.selectionItem, (Action <M0>)(node => { this._hasItemNode = Object.op_Inequality((Object)node, (Object)null); if (this._hasItemNode) { this.IsActiveControl = true; this.Refresh(node.Item); } else { if (!this.isOpen) { return; } this.IsActiveControl = false; } })); ObservableExtensions.Subscribe <long>(Observable.Where <long>(Observable.TakeUntilDestroy <long>((IObservable <M0>)Observable.EveryUpdate(), ((Component)this).get_gameObject()), (Func <M0, bool>)(_ => ((Behaviour)this).get_isActiveAndEnabled())), (Action <M0>)(_ => this.OnUpdate())); ObservableExtensions.Subscribe <int>((IObservable <M0>)Observable.Select <bool, int>((IObservable <M0>) this._takeout, (Func <M0, M1>)(isOn => isOn ? 1 : 0)), (Action <M0>)(index => ((Selectable)this._sendButton).get_image().set_sprite(this._sprites.GetElement <Sprite>(index)))); ((MonoBehaviour)this).StartCoroutine(this.SlotBind()); ObservableExtensions.Subscribe <int>(Observable.Merge <int>((IObservable <M0>[]) new IObservable <int>[2] { (IObservable <int>)Observable.Select <PointerEventData, int>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this._sendButton), (Func <M0, M1>)(_ => 0)), (IObservable <int>)Observable.Select <PointerEventData, int>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this._removeButton), (Func <M0, M1>)(_ => 1)) }), (Action <M0>)(id => ((ReactiveProperty <int>) this._selectID).set_Value(id))); ObservableExtensions.Subscribe <RectTransform>(Observable.Where <RectTransform>((IObservable <M0>)Observable.Select <int, RectTransform>((IObservable <M0>) this._selectID, (Func <M0, M1>)(i => { if (i == 0) { return((RectTransform)((Component)this._sendButton).GetComponent <RectTransform>()); } return(i == 1 ? (RectTransform)((Component)this._removeButton).GetComponent <RectTransform>() : (RectTransform)null); })), (Func <M0, bool>)(rt => Object.op_Inequality((Object)rt, (Object)null))), (Action <M0>)(rt => CursorFrame.Set(((Graphic)this.cursor).get_rectTransform(), rt, (RectTransform)null))); ActionIDDownCommand actionIdDownCommand1 = new ActionIDDownCommand() { ActionID = ActionID.Submit }; // ISSUE: method pointer actionIdDownCommand1.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__11))); this._actionCommands.Add(actionIdDownCommand1); ActionIDDownCommand actionIdDownCommand2 = new ActionIDDownCommand() { ActionID = ActionID.Cancel }; // ISSUE: method pointer actionIdDownCommand2.TriggerEvent.AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__12))); this._actionCommands.Add(actionIdDownCommand2); base.Start(); }
protected virtual void Start() { ObservableExtensions.Subscribe <PickerRect.Mode>(Observable.TakeUntilDestroy <PickerRect.Mode>((IObservable <M0>) this._mode, (UnityEngine.Component) this), (Action <M0>)(_ => { this.CalcRectPointer(); this.CalcSliderValue(); this.ChangeRectColor(); this.ChangeSliderColor(); })); if (((IEnumerable <Toggle>) this.modeChangeToggles).Any <Toggle>()) { // ISSUE: object of a compiler-generated type is created ((IEnumerable <Toggle>) this.modeChangeToggles).Select <Toggle, \u003C\u003E__AnonType31 <Toggle, PickerRect.Mode> >((Func <Toggle, int, \u003C\u003E__AnonType31 <Toggle, PickerRect.Mode> >)((toggle, index) => new \u003C\u003E__AnonType31 <Toggle, PickerRect.Mode>(toggle, (PickerRect.Mode)index))).Where <\u003C\u003E__AnonType31 <Toggle, PickerRect.Mode> >((Func <\u003C\u003E__AnonType31 <Toggle, PickerRect.Mode>, bool>)(item => Object.op_Inequality((Object)item.toggle, (Object)null))).ToList <\u003C\u003E__AnonType31 <Toggle, PickerRect.Mode> >().ForEach((Action <\u003C\u003E__AnonType31 <Toggle, PickerRect.Mode> >)(item => ObservableExtensions.Subscribe <bool>(Observable.Where <bool>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(item.toggle), (Func <M0, bool>)(isOn => isOn)), (Action <M0>)(_ => this.mode = item.mode)))); } if (Object.op_Inequality((Object)this.slider, (Object)null)) { PickerRect.Control ctrl = PickerRect.Control.Slider; Action <Func <HsvColor, HsvColor> > hsv = (Action <Func <HsvColor, HsvColor> >)(func => this.SetColor(func(this.ColorHSV), ctrl)); Action <Func <Color, Color> > rgb = (Action <Func <Color, Color> >)(func => this.SetColor(func(this.ColorRGB), ctrl)); ObservableExtensions.Subscribe <float>(UnityEventExtensions.AsObservable <float>((UnityEvent <M0>) this.slider.get_onValueChanged()), (Action <M0>)(value => { switch (this.mode) { case PickerRect.Mode.Hue: hsv((Func <HsvColor, HsvColor>)(c => { c.H = value * 360f; return(c); })); break; case PickerRect.Mode.Saturation: hsv((Func <HsvColor, HsvColor>)(c => { c.S = value; return(c); })); break; case PickerRect.Mode.Value: hsv((Func <HsvColor, HsvColor>)(c => { c.V = value; return(c); })); break; case PickerRect.Mode.Red: rgb((Func <Color, Color>)(c => { c.r = (__Null)(double)value; return(c); })); break; case PickerRect.Mode.Green: rgb((Func <Color, Color>)(c => { c.g = (__Null)(double)value; return(c); })); break; case PickerRect.Mode.Blue: rgb((Func <Color, Color>)(c => { c.b = (__Null)(double)value; return(c); })); break; } })); } ObservableExtensions.Subscribe <Vector2>(Observable.DistinctUntilChanged <Vector2>((IObservable <M0>)Observable.Select <Unit, Vector2>(Observable.Where <Unit>(Observable.Where <Unit>(Observable.SkipWhile <Unit>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable((UnityEngine.Component) this), (Func <M0, bool>)(_ => Object.op_Equality((Object)this.info, (Object)null) || Object.op_Equality((Object)this.pointer, (Object)null))), (Func <M0, bool>)(_ => ((Behaviour)this).get_enabled())), (Func <M0, bool>)(_ => this.info.isOn)), (Func <M0, M1>)(_ => this.info.imagePos))), (Action <M0>)(pos => { this.pointer.set_anchoredPosition(pos); Vector2 imageRate = this.info.imageRate; PickerRect.Control ctrlType = PickerRect.Control.Rect; switch (this.mode) { case PickerRect.Mode.Hue: HsvColor colorHsv1 = this.ColorHSV; colorHsv1.S = (float)imageRate.x; colorHsv1.V = (float)imageRate.y; this.SetColor(colorHsv1, ctrlType); break; case PickerRect.Mode.Saturation: HsvColor colorHsv2 = this.ColorHSV; colorHsv2.H = (float)(imageRate.x * 360.0); colorHsv2.V = (float)imageRate.y; this.SetColor(colorHsv2, ctrlType); break; case PickerRect.Mode.Value: HsvColor colorHsv3 = this.ColorHSV; colorHsv3.H = (float)(imageRate.x * 360.0); colorHsv3.S = (float)imageRate.y; this.SetColor(colorHsv3, ctrlType); break; case PickerRect.Mode.Red: Color colorRgb1 = this.ColorRGB; colorRgb1.b = imageRate.x; colorRgb1.g = imageRate.y; this.SetColor(colorRgb1, ctrlType); break; case PickerRect.Mode.Green: Color colorRgb2 = this.ColorRGB; colorRgb2.b = imageRate.x; colorRgb2.r = imageRate.y; this.SetColor(colorRgb2, ctrlType); break; case PickerRect.Mode.Blue: Color colorRgb3 = this.ColorRGB; colorRgb3.r = imageRate.x; colorRgb3.g = imageRate.y; this.SetColor(colorRgb3, ctrlType); break; } })); }
private void Awake() { this.transRender = ((Component)this.renderer).get_transform(); this.transTarget = ((Component)Camera.get_main()).get_transform(); ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable((Component)this), (Func <M0, bool>)(_ => this.renderer.get_enabled())), (Action <M0>)(_ => this.transRender.LookAt(this.transTarget.get_position()))); }
private void Start() { ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)ObservableTriggerExtensions.LateUpdateAsObservable((Component)this), (Func <M0, bool>)(_ => this.enable)), (Action <M0>)(_ => { for (int index = 0; index < this.pv.Length; ++index) { if (this._enable[index]) { this.bone[index].get_transform().CopyPosRotScl(this.pv[index].get_transform()); } } })); }
public static CompositeDisposable BindToEnter( bool isExit, params TagSelection.ICursorTagElement[] elements) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type TagSelection.\u003CBindToEnter\u003Ec__AnonStorey4 enterCAnonStorey4_1 = new TagSelection.\u003CBindToEnter\u003Ec__AnonStorey4(); // ISSUE: reference to a compiler-generated field enterCAnonStorey4_1.isExit = isExit; // ISSUE: reference to a compiler-generated field enterCAnonStorey4_1.elements = elements; CompositeDisposable compositeDisposable = new CompositeDisposable(); // ISSUE: reference to a compiler-generated field foreach (TagSelection.ICursorTagElement element in enterCAnonStorey4_1.elements) { TagSelection.ICursorTagElement item = element; CursorFrame.Set(((Graphic)item.cursor).get_rectTransform(), (RectTransform)((Component)item.selectable).GetComponent <RectTransform>(), (RectTransform)null); DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <Image>((IObservable <M0>)Observable.Select <PointerEventData, Image>(Observable.TakeUntilDestroy <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)item.selectable), (Component)item.cursor), (Func <M0, M1>)(_ => item.cursor)), (Action <M0>)(cursor => { // ISSUE: variable of a compiler-generated type TagSelection.\u003CBindToEnter\u003Ec__AnonStorey4 enterCAnonStorey4 = enterCAnonStorey4_1; Image cursor1 = cursor; ((Behaviour)cursor1).set_enabled(true); if (isExit) { return; } foreach (TagSelection.ICursorTagElement cursorTagElement in ((IEnumerable <TagSelection.ICursorTagElement>)elements).Where <TagSelection.ICursorTagElement>((Func <TagSelection.ICursorTagElement, bool>)(x => Object.op_Inequality((Object)x.cursor, (Object)cursor1)))) { ((Behaviour)cursorTagElement.cursor).set_enabled(false); } })), (ICollection <IDisposable>)compositeDisposable); // ISSUE: reference to a compiler-generated field if (enterCAnonStorey4_1.isExit) { DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <PointerEventData>(Observable.TakeUntilDestroy <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerExitAsObservable((UIBehaviour)item.selectable), (Component)item.cursor), (Action <M0>)(_ => ((Behaviour)item.cursor).set_enabled(false))), (ICollection <IDisposable>)compositeDisposable); } } return(compositeDisposable); }
public static void FocusAdd( this Component component, bool isTabKey, Func <bool> isFocus, Func <int> next, Func <Tuple <bool, int> > direct, int firstIndex, params Selectable[] sels) { if (((IList <Selectable>)sels).IsNullOrEmpty <Selectable>()) { Debug.LogError((object)"FocusRegister Selection None"); } else { Selectable lastCurrent = sels.SafeGet <Selectable>(firstIndex); ObservableExtensions.Subscribe <Selectable>((IObservable <M0>)Observable.Select <GameObject, Selectable>((IObservable <M0>)ObserveExtensions.ObserveEveryValueChanged <Component, GameObject>((M0)component, (Func <M0, M1>)(_ => EventSystem.get_current().get_currentSelectedGameObject()), (FrameCountType)0, false), (Func <M0, M1>)(go => Object.op_Inequality((Object)go, (Object)null) ? (Selectable)go.GetComponent <Selectable>() : (Selectable)null)), (Action <M0>)(sel => { if (((IEnumerable <Selectable>)sels).Contains <Selectable>(sel)) { lastCurrent = sel; } else { if (!isFocus() || !Object.op_Inequality((Object)lastCurrent, (Object)null)) { return; } lastCurrent.Select(); } })); Action <int, bool> focus = (Action <int, bool>)((index, isDirect) => { bool flag = index >= 0; if (!isDirect) { index += sels.Check <Selectable>((Func <Selectable, bool>)(v => Object.op_Equality((Object)v, (Object)lastCurrent))); } MathfEx.LoopValue(ref index, 0, sels.Length - 1); if (!sels[index].IsInteractable() && ((IEnumerable <Selectable>)sels).Any <Selectable>((Func <Selectable, bool>)(p => p.IsInteractable()))) { if (!flag) { index = Mathf.Min(sels.Length, index + 1); } IEnumerable <int> ints1 = Enumerable.Range(index, sels.Length - index); IEnumerable <int> ints2 = Enumerable.Range(0, index); index = (!flag ? ints2.Reverse <int>().Concat <int>(ints1.Reverse <int>()) : ints1.Concat <int>(ints2)).FirstOrDefault <int>((Func <int, bool>)(i => sels[i].IsInteractable())); } sels[index].Select(); }); if (isTabKey) { ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>(Observable.Where <Unit>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable(component), (Func <M0, bool>)(_ => isFocus())), (Func <M0, bool>)(_ => Input.GetKeyDown((KeyCode)9))), (Action <M0>)(_ => focus(Input.GetKey((KeyCode)304) || Input.GetKey((KeyCode)303) ? -1 : 1, false))); } if (!next.IsNullOrEmpty()) { ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable(component), (Func <M0, bool>)(_ => isFocus())), (Action <M0>)(_ => { int num = next(); if (num == 0) { return; } focus(num, false); })); } if (direct.IsNullOrEmpty()) { return; } ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable(component), (Func <M0, bool>)(_ => isFocus())), (Action <M0>)(_ => { Tuple <bool, int> tuple = direct(); if (!tuple.Item1) { return; } focus(tuple.Item2, true); })); } }
public void Start() { if (this.IsStartUp) { return; } this.InitCharaList(true); if (Object.op_Implicit((Object)this.btnEntry)) { ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnEntry), (Func <M0, bool>)(_ => !Singleton <Scene> .Instance.IsNowLoadingFade)), (Action <M0>)(_ => { if (this.onLoadItemFunc != null) { this.onLoadItemFunc(this.listCtrl.GetNowSelectCard()); } Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.OK_L); })); } // ISSUE: method pointer this.actionEntry.listActionEnter.Add(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__2))); // ISSUE: method pointer this.actionEntry.listActionExit.Add(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__3))); this.UpdateWindow(this.windowType, true, false); if (Object.op_Implicit((Object)this.tglMale)) { ObservableExtensions.Subscribe <bool>(Observable.Where <bool>(UnityEventExtensions.AsObservable <bool>((UnityEvent <M0>) this.tglMale.onValueChanged), (Func <M0, bool>)(_ => this.selectSex != 0)), (Action <M0>)(_isOn => { if (!_isOn) { return; } this.selectSex = 0; this.CreateCharaList(this.lstMaleCharaFileInfo, false); this.listCtrl.SetNowSelectToggle(); if (this.listCtrl.GetNowSelectCard() != null) { this.listCtrl.SetParameterWindowVisible(true); } Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.OK_S); })); ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this.tglMale), (Action <M0>)(_ => Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Select))); } if (Object.op_Implicit((Object)this.tglFemale)) { ObservableExtensions.Subscribe <bool>(Observable.Where <bool>(UnityEventExtensions.AsObservable <bool>((UnityEvent <M0>) this.tglFemale.onValueChanged), (Func <M0, bool>)(_ => this.selectSex != 1)), (Action <M0>)(_isOn => { if (!_isOn) { return; } this.selectSex = 1; this.CreateCharaList(this.lstFemaleCharaFileInfo, false); this.listCtrl.SetNowSelectToggle(); if (this.listCtrl.GetNowSelectCard() != null) { this.listCtrl.SetParameterWindowVisible(true); } Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.OK_S); })); ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this.tglFemale), (Action <M0>)(_ => Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Select))); } if (Object.op_Implicit((Object)this.btnCharacterCreation)) { ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnCharacterCreation), (Func <M0, bool>)(_ => !Singleton <Scene> .Instance.IsNowLoadingFade)), (Action <M0>)(_ => { if (this.onCharaCreateClickAction != null) { this.onCharaCreateClickAction(this.selectSex); } Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.OK_L); })); ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this.btnCharacterCreation), (Action <M0>)(_ => Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Select))); ((UnityEngine.Component) this.btnCharacterCreation).get_gameObject().SetActiveIfDifferent(!this._hideCharacterCreation); } // ISSUE: method pointer this.actionFemaleSelect.listActionEnter.Add(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__D))); // ISSUE: method pointer this.actionFemaleSelect.listActionExit.Add(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__E))); // ISSUE: method pointer this.actionMaleSelect.listActionEnter.Add(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__F))); // ISSUE: method pointer this.actionMaleSelect.listActionExit.Add(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__10))); this.selectReactive = new BoolReactiveProperty(false); UnityUIComponentExtensions.SubscribeToInteractable((IObservable <bool>) this.selectReactive, (Selectable)this.btnEntry); this.listCtrl.onChangeItem = (Action <bool>)(_isOn => ((ReactiveProperty <bool>) this.selectReactive).set_Value(_isOn)); ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>(Observable.Where <Unit>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable((UnityEngine.Component) this), (Func <M0, bool>)(_ => Input.GetMouseButtonUp(1))), (Func <M0, bool>)(_ => !Singleton <Scene> .Instance.IsNowLoadingFade)), (Action <M0>)(_ => { if (this.onClickRightFunc == null) { return; } this.onClickRightFunc(); })); if (Object.op_Implicit((Object)this.btnClose)) { ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnClose), (Action <M0>)(_ => { Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Cancel); if (this.onCloseWindowFunc == null) { return; } this.onCloseWindowFunc(); })); ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)this.btnClose), (Action <M0>)(_ => Singleton <Resources> .Instance.SoundPack.Play(SoundPack.SystemSE.Select))); ((UnityEngine.Component) this.btnClose).get_gameObject().SetActiveIfDifferent(!this._hideClose); } this.IsStartUp = true; }
protected override void Start() { base.Start(); this.customBase.actUpdateCvsHair += new Action(((CvsBase)this).UpdateCustomUI); this.UpdateHairList(); this.sscHairType.SetToggleID(this.hair.parts[this.SNo].id); this.sscHairType.onSelect = (Action <CustomSelectInfo>)(info => { if (info == null || this.hair.parts[this.SNo].id == info.id) { return; } this.chaCtrl.ChangeHair(this.SNo, info.id, false); this.chaCtrl.SetHairAcsDefaultColorParameterOnly(this.SNo); this.chaCtrl.ChangeSettingHairAcsColor(this.SNo); this.SetDrawSettingByHair(); }); this.csBaseColor.actUpdateColor = (Action <Color>)(color => { if (this.autoSetting) { Color topColor; Color underColor; Color specular; this.chaCtrl.CreateHairColor(color, out topColor, out underColor, out specular); for (int parts = 0; parts < this.hair.parts.Length; ++parts) { if (this.sameSetting || parts == this.SNo) { this.hair.parts[parts].baseColor = color; this.hair.parts[parts].topColor = topColor; this.hair.parts[parts].underColor = underColor; this.hair.parts[parts].specular = specular; this.chaCtrl.ChangeSettingHairColor(parts, true, this.autoSetting, this.autoSetting); this.chaCtrl.ChangeSettingHairSpecular(parts); this.csTopColor.SetColor(this.hair.parts[this.SNo].topColor); this.csUnderColor.SetColor(this.hair.parts[this.SNo].underColor); this.csSpecular.SetColor(this.hair.parts[this.SNo].specular); } } } else { for (int parts = 0; parts < this.hair.parts.Length; ++parts) { if (this.sameSetting || parts == this.SNo) { this.hair.parts[parts].baseColor = color; this.chaCtrl.ChangeSettingHairColor(parts, true, this.autoSetting, this.autoSetting); } } } }); this.csTopColor.actUpdateColor = (Action <Color>)(color => { for (int parts = 0; parts < this.hair.parts.Length; ++parts) { if (this.sameSetting || parts == this.SNo) { this.hair.parts[parts].topColor = color; this.chaCtrl.ChangeSettingHairColor(parts, false, true, false); } } }); this.csUnderColor.actUpdateColor = (Action <Color>)(color => { for (int parts = 0; parts < this.hair.parts.Length; ++parts) { if (this.sameSetting || parts == this.SNo) { this.hair.parts[parts].underColor = color; this.chaCtrl.ChangeSettingHairColor(parts, false, false, true); } } }); this.csSpecular.actUpdateColor = (Action <Color>)(color => { for (int parts = 0; parts < this.hair.parts.Length; ++parts) { if (this.sameSetting || parts == this.SNo) { this.hair.parts[parts].specular = color; this.chaCtrl.ChangeSettingHairSpecular(parts); } } }); this.ssMetallic.onChange = (Action <float>)(value => { for (int parts = 0; parts < this.hair.parts.Length; ++parts) { if (this.sameSetting || parts == this.SNo) { this.hair.parts[parts].metallic = value; this.chaCtrl.ChangeSettingHairMetallic(parts); } } }); this.ssMetallic.onSetDefaultValue = (Func <float>)(() => this.defChaCtrl.custom.hair.parts[this.SNo].metallic); this.ssSmoothness.onChange = (Action <float>)(value => { for (int parts = 0; parts < this.hair.parts.Length; ++parts) { if (this.sameSetting || parts == this.SNo) { this.hair.parts[parts].smoothness = value; this.chaCtrl.ChangeSettingHairSmoothness(parts); } } }); this.ssSmoothness.onSetDefaultValue = (Func <float>)(() => this.defChaCtrl.custom.hair.parts[this.SNo].smoothness); this.hcPreset.onClick = (Action <CustomHairColorPreset.HairColorInfo>)(preset => { for (int parts = 0; parts < this.hair.parts.Length; ++parts) { if (this.sameSetting || parts == this.SNo) { this.hair.parts[parts].baseColor = preset.baseColor; this.hair.parts[parts].topColor = preset.topColor; this.hair.parts[parts].underColor = preset.underColor; this.hair.parts[parts].specular = preset.specular; this.hair.parts[parts].metallic = preset.metallic; this.hair.parts[parts].smoothness = preset.smoothness; this.chaCtrl.ChangeSettingHairColor(parts, true, true, true); this.chaCtrl.ChangeSettingHairSpecular(parts); this.chaCtrl.ChangeSettingHairMetallic(parts); this.chaCtrl.ChangeSettingHairSmoothness(parts); this.csBaseColor.SetColor(this.hair.parts[parts].baseColor); this.csTopColor.SetColor(this.hair.parts[parts].topColor); this.csUnderColor.SetColor(this.hair.parts[parts].underColor); this.csSpecular.SetColor(this.hair.parts[parts].specular); this.ssMetallic.SetSliderValue(this.hair.parts[parts].metallic); this.ssSmoothness.SetSliderValue(this.hair.parts[parts].smoothness); } } }); if (this.csAcsColor != null && ((IEnumerable <CustomColorSet>) this.csAcsColor).Any <CustomColorSet>()) { ((IEnumerable <CustomColorSet>) this.csAcsColor).ToList <CustomColorSet>().ForEach((Action <CustomColorSet>)(item => item.actUpdateColor = (Action <Color>)(color => { this.hair.parts[this.SNo].acsColorInfo[0].color = color; this.chaCtrl.ChangeSettingHairAcsColor(this.SNo); }))); } if (Object.op_Implicit((Object)this.btnCorrectAllReset)) { ObservableExtensions.Subscribe <Unit>((IObservable <M0>)UnityUIComponentExtensions.OnClickAsObservable(this.btnCorrectAllReset), (Action <M0>)(_ => { this.chaCtrl.SetDefaultHairCorrectPosRateAll(this.SNo); this.chaCtrl.SetDefaultHairCorrectRotRateAll(this.SNo); this.UpdateAllBundleUI(-1); })); } ObservableExtensions.Subscribe <bool>(UnityEventExtensions.AsObservable <bool>((UnityEvent <M0>) this.tglGuidDraw.onValueChanged), (Action <M0>)(isOn => this.hairCtrlSetting.drawController = isOn)); if (((IEnumerable <Toggle>) this.tglGuidType).Any <Toggle>()) { // ISSUE: object of a compiler-generated type is created ((IEnumerable <Toggle>) this.tglGuidType).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 => ObservableExtensions.Subscribe <bool>(Observable.Where <bool>(UnityEventExtensions.AsObservable <bool>((UnityEvent <M0>)item.val.onValueChanged), (Func <M0, bool>)(isOn => isOn)), (Action <M0>)(isOn => { this.hairCtrlSetting.controllerType = item.idx; this.UpdateGuidType(); })))); } ObservableExtensions.Subscribe <float>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(this.sldGuidSpeed), (Action <M0>)(val => { this.hairCtrlSetting.controllerSpeed = val; this.UpdateGuidSpeed(); })); ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnScrollAsObservable((UIBehaviour)this.sldGuidSpeed), (Action <M0>)(scl => { if (!this.customBase.sliderControlWheel) { return; } this.sldGuidSpeed.set_value(Mathf.Clamp(this.sldGuidSpeed.get_value() + (float)(scl.get_scrollDelta().y * -0.00999999977648258), 0.1f, 1f)); })); ObservableExtensions.Subscribe <float>((IObservable <M0>)UnityUIComponentExtensions.OnValueChangedAsObservable(this.sldGuidScale), (Action <M0>)(val => { this.hairCtrlSetting.controllerScale = val; this.UpdateGuidScale(); })); ObservableExtensions.Subscribe <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnScrollAsObservable((UIBehaviour)this.sldGuidScale), (Action <M0>)(scl => { if (!this.customBase.sliderControlWheel) { return; } this.sldGuidScale.set_value(Mathf.Clamp(this.sldGuidScale.get_value() + (float)(scl.get_scrollDelta().y * -0.00999999977648258), 0.3f, 3f)); })); this.UpdateDrawControllerState(); this.StartCoroutine(this.SetInputText()); this.backSNo = this.SNo; }
public static CompositeDisposable BindToEnter( bool isExit, Image cursor, params Selectable[] selectables) { CompositeDisposable compositeDisposable = new CompositeDisposable(); foreach (Selectable selectable in selectables) { Selectable item = selectable; DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <PointerEventData>(Observable.Where <PointerEventData>(Observable.TakeUntilDestroy <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerEnterAsObservable((UIBehaviour)item), (Component)cursor), (Func <M0, bool>)(_ => item.IsInteractable())), (Action <M0>)(_ => { ((Behaviour)cursor).set_enabled(true); CursorFrame.Set(((Graphic)cursor).get_rectTransform(), (RectTransform)((Component)item).GetComponent <RectTransform>(), (RectTransform)null); })), (ICollection <IDisposable>)compositeDisposable); if (isExit) { DisposableExtensions.AddTo <IDisposable>((M0)ObservableExtensions.Subscribe <PointerEventData>(Observable.TakeUntilDestroy <PointerEventData>((IObservable <M0>)ObservableTriggerExtensions.OnPointerExitAsObservable((UIBehaviour)item), (Component)cursor), (Action <M0>)(_ => ((Behaviour)cursor).set_enabled(false))), (ICollection <IDisposable>)compositeDisposable); } } return(compositeDisposable); }
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 Start() { this.scrollR = (ScrollRect)((Component)this.rtfScroll).GetComponent <ScrollRect>(); if (!Object.op_Implicit((Object)this.scrollR)) { return; } ObservableExtensions.Subscribe <Unit>(Observable.Where <Unit>((IObservable <M0>)ObservableTriggerExtensions.UpdateAsObservable((Component)this.scrollR), (Func <M0, bool>)(_ => this.updateNormalizePosition)), (Action <M0>)(_ => { this.updateNormalizePosition = false; this.scrollR.set_verticalNormalizedPosition(0.0f); })); }
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())); }