public static void SetValue(this Slider instance, float value) { Slider.SliderEvent originalEvent = instance.onValueChanged; instance.onValueChanged = emptySliderEvent; instance.value = value; instance.onValueChanged = originalEvent; }
public static void SetValueNoCallback(this Slider self, float value) { Slider.SliderEvent cachedEvent = self.onValueChanged; self.onValueChanged = _emptySliderEvent; self.value = value; self.onValueChanged = cachedEvent; }
public void SetValue(TMP_InputField input) { Slider.SliderEvent bak1 = ItemSlider.onValueChanged; TMP_InputField.OnChangeEvent bak2 = ItemInput.onValueChanged; ItemSlider.onValueChanged = new Slider.SliderEvent(); ItemInput.onValueChanged = new TMP_InputField.OnChangeEvent(); if (input.text == "") { input.text = "0"; } value = float.Parse(input.text); value = (float)Math.Round((double)value, 2); ItemSlider.value = value; ItemInput.text = value.ToString(); if (ColorType == 0) { colorMenu.UpdateColorRGB(); } else { colorMenu.UpdateColorHSV(); } ItemSlider.onValueChanged = bak1; ItemInput.onValueChanged = bak2; }
public static void SetValue(this Slider slider, float v) { #if UNITY_2019_1_OR_NEWER slider.SetValueWithoutNotify(v); #else Slider.SliderEvent originalEvent = slider.onValueChanged; slider.onValueChanged = emptySliderEvent; slider.value = v; slider.onValueChanged = originalEvent; #endif }
/// <summary> /// 滑动条数值变动监控 /// </summary> /// <param name="go"></param> /// <param name="luafunc"></param> public void AddSliderValueChange(GameObject go, LuaFunction luafunc) { var slider = go.GetComponent <Slider>(); if (slider != null) { var changeEvent = new Slider.SliderEvent(); changeEvent.AddListener((float value) => luafunc.Call(value)); slider.onValueChanged = changeEvent; } }
public void AddSliderToPanel(string sliderName, GameObject panel1, Slider.SliderEvent sliderEvents, int minValue, int maxValue) { Slider slider = Instantiate(sliderTemplate, new Vector3(78, latestButtonY - 60), new Quaternion(0f, 0f, 0f, 0f)); slider.GetComponentInChildren <Text>().text = sliderNames; slider.transform.SetParent(panel1.transform, false); slider.wholeNumbers = true; slider.minValue = minValue; slider.maxValue = maxValue; slider.onValueChanged = sliderEvents; latestButtonY -= 60; }
private void Start() { if (Object.op_Inequality((Object)this.SoundVolume, (Object)null)) { this.SoundVolume.set_value(GameUtility.Config_SoundVolume); Slider.SliderEvent onValueChanged = this.SoundVolume.get_onValueChanged(); // ISSUE: reference to a compiler-generated field if (OptionDetail.\u003C\u003Ef__am\u0024cache4 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer OptionDetail.\u003C\u003Ef__am\u0024cache4 = new UnityAction <float>((object)null, __methodptr(\u003CStart\u003Em__376)); } // ISSUE: reference to a compiler-generated field UnityAction <float> fAmCache4 = OptionDetail.\u003C\u003Ef__am\u0024cache4; ((UnityEvent <float>)onValueChanged).AddListener(fAmCache4); } if (Object.op_Inequality((Object)this.MusicVolume, (Object)null)) { this.MusicVolume.set_value(GameUtility.Config_MusicVolume); Slider.SliderEvent onValueChanged = this.MusicVolume.get_onValueChanged(); // ISSUE: reference to a compiler-generated field if (OptionDetail.\u003C\u003Ef__am\u0024cache5 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer OptionDetail.\u003C\u003Ef__am\u0024cache5 = new UnityAction <float>((object)null, __methodptr(\u003CStart\u003Em__377)); } // ISSUE: reference to a compiler-generated field UnityAction <float> fAmCache5 = OptionDetail.\u003C\u003Ef__am\u0024cache5; ((UnityEvent <float>)onValueChanged).AddListener(fAmCache5); } if (Object.op_Inequality((Object)this.VoiceVolume, (Object)null)) { this.VoiceVolume.set_value(GameUtility.Config_VoiceVolume); Slider.SliderEvent onValueChanged = this.VoiceVolume.get_onValueChanged(); // ISSUE: reference to a compiler-generated field if (OptionDetail.\u003C\u003Ef__am\u0024cache6 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer OptionDetail.\u003C\u003Ef__am\u0024cache6 = new UnityAction <float>((object)null, __methodptr(\u003CStart\u003Em__378)); } // ISSUE: reference to a compiler-generated field UnityAction <float> fAmCache6 = OptionDetail.\u003C\u003Ef__am\u0024cache6; ((UnityEvent <float>)onValueChanged).AddListener(fAmCache6); } this.UpdateChargeDispText(GameUtility.Config_ChargeDisp.Value); GameParameter.UpdateAll(((Component)this).get_gameObject()); }
public void SetValue(float value) { Slider.SliderEvent bak1 = ItemSlider.onValueChanged; TMP_InputField.OnChangeEvent bak2 = ItemInput.onValueChanged; ItemSlider.onValueChanged = new Slider.SliderEvent(); ItemInput.onValueChanged = new TMP_InputField.OnChangeEvent(); this.value = (float)Math.Round((double)value, 2); ItemSlider.value = this.value; ItemInput.text = this.value.ToString(); ItemSlider.onValueChanged = bak1; ItemInput.onValueChanged = bak2; }
public void SetValue(byte value) { Slider.SliderEvent bak1 = ItemSlider.onValueChanged; TMP_InputField.OnChangeEvent bak2 = ItemInput.onValueChanged; ItemSlider.onValueChanged = new Slider.SliderEvent(); ItemInput.onValueChanged = new TMP_InputField.OnChangeEvent(); this.value = value; ItemSlider.value = this.value; ItemInput.text = this.value.ToString(); ItemSlider.onValueChanged = bak1; ItemInput.onValueChanged = bak2; }
public static int constructor(IntPtr l) { int result; try { Slider.SliderEvent o = new Slider.SliderEvent(); LuaObject.pushValue(l, true); LuaObject.pushValue(l, o); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
private static int set_onValueChanged(IntPtr L) { object obj = null; int result; try { obj = ToLua.ToObject(L, 1); Slider slider = (Slider)obj; Slider.SliderEvent onValueChanged = (Slider.SliderEvent)ToLua.CheckObject(L, 2, typeof(Slider.SliderEvent)); slider.onValueChanged = onValueChanged; result = 0; } catch (Exception ex) { result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index onValueChanged on a nil value"); } return(result); }
private void Start() { EventTriggerListener.Get(closeBtn).onClick = OnCloseClick; EventTriggerListener.Get(maskBg).onClick = OnCloseClick; EventTriggerListener.Get(exitBtn.gameObject).onClick = OnExitLoginClick; EventTriggerListener.Get(musicBtn.gameObject).onClick = OnMusicClick; EventTriggerListener.Get(soundBtn.gameObject).onClick = OnSoundClick; Slider.SliderEvent musicEvent = new Slider.SliderEvent(); musicEvent.AddListener(OnMusicValueChange); sliderMusic.onValueChanged = musicEvent; Slider.SliderEvent soundEvent = new Slider.SliderEvent(); soundEvent.AddListener(OnSoundValueChange); sliderSound.onValueChanged = soundEvent; Init(); }
// Use this for initialization void Start() { m_Slider = GetComponentInChildren <Slider>(); m_InputField = GetComponentInChildren <InputField>(); // Event var eS = new Slider.SliderEvent(); eS.AddListener(SliderCallback); m_Slider.onValueChanged = eS; var eI = new InputField.SubmitEvent(); eI.AddListener(InputFieldCallback); m_InputField.onEndEdit = eI; m_InputField.onValidateInput += delegate(string input, int charIndex, char addedChar) { return(InputFieldValidate(addedChar)); }; // Set Placeholder switch (Setting) { case Settings.DownloadDelay: SetPlaceholder(scr_InputManager.DownloadDelay); break; case Settings.UpdateDelay: SetPlaceholder(scr_InputManager.UpdateDelay); break; case Settings.ReleaseTimer: SetPlaceholder(scr_InputManager.ReleaseTimer); break; case Settings.MoveSpeed: SetPlaceholder(scr_InputManager.MoveSpeed); break; case Settings.ZoomSpeed: SetPlaceholder(scr_InputManager.ZoomSpeed); break; } }
// Use this for initialization void Start() { LoadAndSetSliderFloat(Preferences.FXVolumeKey, Preferences.Current.FXVolume); LoadAndSetSliderFloat(Preferences.MusicVolumeKey, Preferences.Current.MusicVolume); LoadAndSetSliderFloat(Preferences.PlayerSpeedKey, Preferences.Current.PlayerSpeed); LoadAndSetToggleBool(Preferences.LiveTilesKey, Preferences.Current.UseLiveTiles); LoadAndSetToggleBool(Preferences.XboxLiveKey, Preferences.Current.UseXboxLive); //Doing this from code just for kicks.. GameObject playerSpeedObject = GameObject.Find(Preferences.PlayerSpeedKey + SliderPostfix); if (playerSpeedObject != null) { Slider slider = playerSpeedObject.GetComponent <Slider>(); Debug.Assert(slider != null); Slider.SliderEvent evt = new Slider.SliderEvent(); evt.AddListener(OnPlayerSpeedValueChanged); } if (!UserFactory.UseIdentity) { GameObject.Find(Preferences.XboxLiveKey + TogglePostfix).GetComponent <Toggle>().interactable = false; } }
public static void Add(this Slider.SliderEvent sliderEvent, Action action) { sliderEvent.AddListener((index) => { action(); }); }
private void Start() { if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.SoundVolume, (UnityEngine.Object)null)) { this.SoundVolume.set_value(GameUtility.Config_SoundVolume); Slider.SliderEvent onValueChanged = this.SoundVolume.get_onValueChanged(); // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache1E == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache1E = new UnityAction <float>((object)null, __methodptr(\u003CStart\u003Em__2E0)); } // ISSUE: reference to a compiler-generated field UnityAction <float> fAmCache1E = ConfigWindow.\u003C\u003Ef__am\u0024cache1E; ((UnityEvent <float>)onValueChanged).AddListener(fAmCache1E); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.MusicVolume, (UnityEngine.Object)null)) { this.MusicVolume.set_value(GameUtility.Config_MusicVolume); Slider.SliderEvent onValueChanged = this.MusicVolume.get_onValueChanged(); // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache1F == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache1F = new UnityAction <float>((object)null, __methodptr(\u003CStart\u003Em__2E1)); } // ISSUE: reference to a compiler-generated field UnityAction <float> fAmCache1F = ConfigWindow.\u003C\u003Ef__am\u0024cache1F; ((UnityEvent <float>)onValueChanged).AddListener(fAmCache1F); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.VoiceVolume, (UnityEngine.Object)null)) { this.VoiceVolume.set_value(GameUtility.Config_VoiceVolume); Slider.SliderEvent onValueChanged = this.VoiceVolume.get_onValueChanged(); // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache20 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache20 = new UnityAction <float>((object)null, __methodptr(\u003CStart\u003Em__2E2)); } // ISSUE: reference to a compiler-generated field UnityAction <float> fAmCache20 = ConfigWindow.\u003C\u003Ef__am\u0024cache20; ((UnityEvent <float>)onValueChanged).AddListener(fAmCache20); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.UseAssetBundle, (UnityEngine.Object)null)) { this.UseAssetBundle.set_isOn(GameUtility.Config_UseAssetBundles.Value); // ISSUE: variable of the null type __Null onValueChanged = this.UseAssetBundle.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache21 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache21 = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__2E3)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache21 = ConfigWindow.\u003C\u003Ef__am\u0024cache21; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache21); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.UseDevServer, (UnityEngine.Object)null)) { this.UseDevServer.set_isOn(GameUtility.Config_UseDevServer.Value); // ISSUE: variable of the null type __Null onValueChanged = this.UseDevServer.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache22 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache22 = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__2E4)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache22 = ConfigWindow.\u003C\u003Ef__am\u0024cache22; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache22); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.UseAwsServer, (UnityEngine.Object)null)) { this.UseAwsServer.set_isOn(GameUtility.Config_UseAwsServer.Value); // ISSUE: variable of the null type __Null onValueChanged = this.UseAwsServer.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache23 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache23 = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__2E5)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache23 = ConfigWindow.\u003C\u003Ef__am\u0024cache23; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache23); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.UseAutoPlay, (UnityEngine.Object)null)) { this.UseAutoPlay.set_isOn(GameUtility.Config_UseAutoPlay.Value); // ISSUE: variable of the null type __Null onValueChanged = this.UseAutoPlay.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache24 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache24 = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__2E6)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache24 = ConfigWindow.\u003C\u003Ef__am\u0024cache24; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache24); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.UsePushStamina, (UnityEngine.Object)null)) { this.UsePushStamina.set_isOn(GameUtility.Config_UsePushStamina.Value); // ISSUE: variable of the null type __Null onValueChanged = this.UsePushStamina.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache25 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache25 = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__2E7)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache25 = ConfigWindow.\u003C\u003Ef__am\u0024cache25; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache25); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.UsePushNews, (UnityEngine.Object)null)) { this.UsePushNews.set_isOn(GameUtility.Config_UsePushNews.Value); // ISSUE: variable of the null type __Null onValueChanged = this.UsePushNews.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache26 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache26 = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__2E8)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache26 = ConfigWindow.\u003C\u003Ef__am\u0024cache26; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache26); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.MultiInvitationFlag, (UnityEngine.Object)null)) { bool multiInvitaionFlag = MonoSingleton <GameManager> .Instance.Player.MultiInvitaionFlag; GlobalVars.MultiInvitaionFlag = multiInvitaionFlag; this.MultiInvitationFlag.set_isOn(multiInvitaionFlag); // ISSUE: variable of the null type __Null onValueChanged = this.MultiInvitationFlag.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache27 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache27 = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__2E9)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache27 = ConfigWindow.\u003C\u003Ef__am\u0024cache27; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache27); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.MultiInvitationComment, (UnityEngine.Object)null)) { string invitaionComment = MonoSingleton <GameManager> .Instance.Player.MultiInvitaionComment; GlobalVars.MultiInvitaionComment = invitaionComment; if (!string.IsNullOrEmpty(invitaionComment)) { this.MultiInvitationComment.SetText(invitaionComment); } InputField.OnChangeEvent onValueChanged = this.MultiInvitationComment.get_onValueChanged(); // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache28 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache28 = new UnityAction <string>((object)null, __methodptr(\u003CStart\u003Em__2EA)); } // ISSUE: reference to a compiler-generated field UnityAction <string> fAmCache28 = ConfigWindow.\u003C\u003Ef__am\u0024cache28; ((UnityEvent <string>)onValueChanged).AddListener(fAmCache28); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ToggleChatState, (UnityEngine.Object)null)) { this.ToggleChatState.set_isOn(GameUtility.Config_ChatState.Value); // ISSUE: variable of the null type __Null onValueChanged = this.ToggleChatState.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache29 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache29 = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__2EB)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache29 = ConfigWindow.\u003C\u003Ef__am\u0024cache29; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache29); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ToggleMultiState, (UnityEngine.Object)null)) { this.ToggleMultiState.set_isOn(GameUtility.Config_MultiState.Value); // ISSUE: variable of the null type __Null onValueChanged = this.ToggleMultiState.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache2A == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache2A = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__2EC)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache2A = ConfigWindow.\u003C\u003Ef__am\u0024cache2A; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache2A); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.NewGame, (UnityEngine.Object)null)) { this.NewGame.set_isOn(GameUtility.Config_NewGame.Value); // ISSUE: variable of the null type __Null onValueChanged = this.NewGame.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache2B == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache2B = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__2ED)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache2B = ConfigWindow.\u003C\u003Ef__am\u0024cache2B; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache2B); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.MultiUserSetting, (UnityEngine.Object)null)) { // ISSUE: method pointer ((UnityEvent <bool>) this.MultiUserSetting.onValueChanged).AddListener(new UnityAction <bool>((object)this, __methodptr(\u003CStart\u003Em__2EE))); ((Component)this.MultiUserSetting).get_gameObject().SetActive(false); ((Component)this.MultiUserName).get_gameObject().SetActive(false); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.UseLocalMasterData, (UnityEngine.Object)null)) { this.UseLocalMasterData.set_isOn(GameUtility.Config_UseLocalData.Value); // ISSUE: variable of the null type __Null onValueChanged = this.UseLocalMasterData.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache2C == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache2C = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__2EF)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache2C = ConfigWindow.\u003C\u003Ef__am\u0024cache2C; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache2C); ((Component)this.UseLocalMasterData).get_gameObject().SetActive(false); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.VoiceCopyButton, (UnityEngine.Object)null)) { // ISSUE: method pointer ((UnityEvent)this.VoiceCopyButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__2F0))); ((Component)((Component)this.VoiceCopyButton).get_gameObject().get_transform().get_parent()).get_gameObject().SetActive(false); } for (int index = 0; index < this.InputMethods.Length; ++index) { if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.InputMethods[index], (UnityEngine.Object)null)) { // ISSUE: method pointer ((UnityEvent <bool>) this.InputMethods[index].onValueChanged).AddListener(new UnityAction <bool>((object)this, __methodptr(OnInputMethodChange))); } } MoveInputMethods configInputMethod = GameUtility.Config_InputMethod; if (configInputMethod < (MoveInputMethods)this.InputMethods.Length && UnityEngine.Object.op_Inequality((UnityEngine.Object) this.InputMethods[(int)configInputMethod], (UnityEngine.Object)null)) { this.InputMethods[(int)configInputMethod].set_isOn(true); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.LoginBonus, (UnityEngine.Object)null)) { this.LoginBonus.SetActive(MonoSingleton <GameManager> .Instance.Player.LoginBonus != null); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.LoginBonus28days, (UnityEngine.Object)null)) { this.LoginBonus28days.SetActive(MonoSingleton <GameManager> .Instance.Player.LoginBonus28days != null); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.MasterCheckButton, (UnityEngine.Object)null)) { ((Component)this.MasterCheckButton).get_gameObject().SetActive(false); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.AwardState, (UnityEngine.Object)null)) { PlayerData player = MonoSingleton <GameManager> .Instance.Player; if (player != null) { DataSource.Bind <PlayerData>(this.AwardState, player); } } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.SupportIcon, (UnityEngine.Object)null)) { UnitData unitDataByUniqueId = MonoSingleton <GameManager> .Instance.Player.FindUnitDataByUniqueID((long)GlobalVars.SelectedSupportUnitUniqueID); if (unitDataByUniqueId != null) { DataSource.Bind <UnitData>(this.SupportIcon, unitDataByUniqueId); } } ConfigWindow.SetupTreasureList(this.TreasureList, this.TreasureListNode, this.Prefab_NewItemBadge, ((Component)this).get_gameObject(), this.mTreasureListNodes); GameParameter.UpdateAll(((Component)this).get_gameObject()); }
public static void Add(this Slider.SliderEvent sliderEvent, Action <float> action) { sliderEvent.AddListener((slider) => { action(slider); }); }
public static void Add(this Slider.SliderEvent SliderValueChangedEvent, Action <float> action) { SliderValueChangedEvent.AddListener((float value) => action(value)); }
private void Start() { this.IsModeSentaku = true; if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.SoundVolume, (UnityEngine.Object)null)) { this.SoundVolume.set_value(GameUtility.Config_SoundVolume); Slider.SliderEvent onValueChanged = this.SoundVolume.get_onValueChanged(); // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache28 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache28 = new UnityAction <float>((object)null, __methodptr(\u003CStart\u003Em__340)); } // ISSUE: reference to a compiler-generated field UnityAction <float> fAmCache28 = ConfigWindow.\u003C\u003Ef__am\u0024cache28; ((UnityEvent <float>)onValueChanged).AddListener(fAmCache28); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.MusicVolume, (UnityEngine.Object)null)) { this.MusicVolume.set_value(GameUtility.Config_MusicVolume); Slider.SliderEvent onValueChanged = this.MusicVolume.get_onValueChanged(); // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache29 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache29 = new UnityAction <float>((object)null, __methodptr(\u003CStart\u003Em__341)); } // ISSUE: reference to a compiler-generated field UnityAction <float> fAmCache29 = ConfigWindow.\u003C\u003Ef__am\u0024cache29; ((UnityEvent <float>)onValueChanged).AddListener(fAmCache29); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.VoiceVolume, (UnityEngine.Object)null)) { this.VoiceVolume.set_value(GameUtility.Config_VoiceVolume); Slider.SliderEvent onValueChanged = this.VoiceVolume.get_onValueChanged(); // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache2A == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache2A = new UnityAction <float>((object)null, __methodptr(\u003CStart\u003Em__342)); } // ISSUE: reference to a compiler-generated field UnityAction <float> fAmCache2A = ConfigWindow.\u003C\u003Ef__am\u0024cache2A; ((UnityEvent <float>)onValueChanged).AddListener(fAmCache2A); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.UseAssetBundle, (UnityEngine.Object)null)) { this.UseAssetBundle.set_isOn(GameUtility.Config_UseAssetBundles.Value); // ISSUE: variable of the null type __Null onValueChanged = this.UseAssetBundle.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache2B == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache2B = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__343)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache2B = ConfigWindow.\u003C\u003Ef__am\u0024cache2B; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache2B); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.UseDevServer, (UnityEngine.Object)null)) { this.UseDevServer.set_isOn(GameUtility.Config_UseDevServer.Value); // ISSUE: variable of the null type __Null onValueChanged = this.UseDevServer.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache2C == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache2C = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__344)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache2C = ConfigWindow.\u003C\u003Ef__am\u0024cache2C; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache2C); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.UseAwsServer, (UnityEngine.Object)null)) { this.UseAwsServer.set_isOn(GameUtility.Config_UseAwsServer.Value); // ISSUE: variable of the null type __Null onValueChanged = this.UseAwsServer.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache2D == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache2D = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__345)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache2D = ConfigWindow.\u003C\u003Ef__am\u0024cache2D; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache2D); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.UseAutoPlay, (UnityEngine.Object)null)) { this.UseAutoPlay.set_isOn(GameUtility.Config_UseAutoPlay.Value); // ISSUE: variable of the null type __Null onValueChanged = this.UseAutoPlay.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache2E == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache2E = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__346)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache2E = ConfigWindow.\u003C\u003Ef__am\u0024cache2E; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache2E); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.UsePushStamina, (UnityEngine.Object)null)) { this.UsePushStamina.set_isOn(GameUtility.Config_UsePushStamina.Value); // ISSUE: variable of the null type __Null onValueChanged = this.UsePushStamina.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache2F == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache2F = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__347)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache2F = ConfigWindow.\u003C\u003Ef__am\u0024cache2F; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache2F); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.UsePushNews, (UnityEngine.Object)null)) { this.UsePushNews.set_isOn(GameUtility.Config_UsePushNews.Value); // ISSUE: variable of the null type __Null onValueChanged = this.UsePushNews.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache30 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache30 = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__348)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache30 = ConfigWindow.\u003C\u003Ef__am\u0024cache30; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache30); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.MultiInvitationFlag, (UnityEngine.Object)null)) { bool multiInvitaionFlag = MonoSingleton <GameManager> .Instance.Player.MultiInvitaionFlag; GlobalVars.MultiInvitaionFlag = multiInvitaionFlag; this.MultiInvitationFlag.set_isOn(multiInvitaionFlag); // ISSUE: variable of the null type __Null onValueChanged = this.MultiInvitationFlag.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache31 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache31 = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__349)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache31 = ConfigWindow.\u003C\u003Ef__am\u0024cache31; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache31); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.MultiInvitationComment, (UnityEngine.Object)null)) { string invitaionComment = MonoSingleton <GameManager> .Instance.Player.MultiInvitaionComment; GlobalVars.MultiInvitaionComment = invitaionComment; if (!string.IsNullOrEmpty(invitaionComment)) { this.MultiInvitationComment.SetText(invitaionComment); } InputField.OnChangeEvent onValueChanged = this.MultiInvitationComment.get_onValueChanged(); // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache32 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache32 = new UnityAction <string>((object)null, __methodptr(\u003CStart\u003Em__34A)); } // ISSUE: reference to a compiler-generated field UnityAction <string> fAmCache32 = ConfigWindow.\u003C\u003Ef__am\u0024cache32; ((UnityEvent <string>)onValueChanged).AddListener(fAmCache32); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ToggleChatState, (UnityEngine.Object)null)) { this.ToggleChatState.set_isOn(GameUtility.Config_ChatState.Value); // ISSUE: variable of the null type __Null onValueChanged = this.ToggleChatState.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache33 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache33 = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__34B)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache33 = ConfigWindow.\u003C\u003Ef__am\u0024cache33; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache33); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ToggleMultiState, (UnityEngine.Object)null)) { this.ToggleMultiState.set_isOn(GameUtility.Config_MultiState.Value); // ISSUE: variable of the null type __Null onValueChanged = this.ToggleMultiState.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache34 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache34 = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__34C)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache34 = ConfigWindow.\u003C\u003Ef__am\u0024cache34; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache34); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.NewGame, (UnityEngine.Object)null)) { this.NewGame.set_isOn(GameUtility.Config_NewGame.Value); // ISSUE: variable of the null type __Null onValueChanged = this.NewGame.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache35 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache35 = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__34D)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache35 = ConfigWindow.\u003C\u003Ef__am\u0024cache35; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache35); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.MultiUserSetting, (UnityEngine.Object)null)) { // ISSUE: method pointer ((UnityEvent <bool>) this.MultiUserSetting.onValueChanged).AddListener(new UnityAction <bool>((object)this, __methodptr(\u003CStart\u003Em__34E))); ((Component)this.MultiUserSetting).get_gameObject().SetActive(false); ((Component)this.MultiUserName).get_gameObject().SetActive(false); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.UseLocalMasterData, (UnityEngine.Object)null)) { this.UseLocalMasterData.set_isOn(GameUtility.Config_UseLocalData.Value); // ISSUE: variable of the null type __Null onValueChanged = this.UseLocalMasterData.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache36 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache36 = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__34F)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache36 = ConfigWindow.\u003C\u003Ef__am\u0024cache36; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache36); ((Component)this.UseLocalMasterData).get_gameObject().SetActive(false); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.VoiceCopyButton, (UnityEngine.Object)null)) { // ISSUE: method pointer ((UnityEvent)this.VoiceCopyButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__350))); ((Component)((Component)this.VoiceCopyButton).get_gameObject().get_transform().get_parent()).get_gameObject().SetActive(false); } for (int index = 0; index < this.InputMethods.Length; ++index) { if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.InputMethods[index], (UnityEngine.Object)null)) { // ISSUE: method pointer ((UnityEvent <bool>) this.InputMethods[index].onValueChanged).AddListener(new UnityAction <bool>((object)this, __methodptr(OnInputMethodChange))); } } MoveInputMethods configInputMethod = GameUtility.Config_InputMethod; if (configInputMethod < (MoveInputMethods)this.InputMethods.Length && UnityEngine.Object.op_Inequality((UnityEngine.Object) this.InputMethods[(int)configInputMethod], (UnityEngine.Object)null)) { this.InputMethods[(int)configInputMethod].set_isOn(true); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.LoginBonus, (UnityEngine.Object)null)) { this.LoginBonus.SetActive(MonoSingleton <GameManager> .Instance.Player.LoginBonus != null); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.LoginBonus28days, (UnityEngine.Object)null)) { this.LoginBonus28days.SetActive(MonoSingleton <GameManager> .Instance.Player.LoginBonus28days != null); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.DevServer, (UnityEngine.Object)null)) { string devServerSetting = GameUtility.DevServerSetting; if (!string.IsNullOrEmpty(devServerSetting)) { this.DevServer.set_text(devServerSetting); if (devServerSetting == "http://dev01-app.alcww.gumi.sg/") { this.devServerSetting = 0; } if (devServerSetting == "http://dev02-app.alcww.gumi.sg/") { this.devServerSetting = 1; } if (devServerSetting == "http://dev03-app.alcww.gumi.sg/") { this.devServerSetting = 2; } if (devServerSetting == "http://dev04-app.alcww.gumi.sg/") { this.devServerSetting = 3; } if (devServerSetting == "http://dev05-app.alcww.gumi.sg/") { this.devServerSetting = 4; } if (devServerSetting == "http://stg-app.alcww.gumi.sg/") { this.devServerSetting = 5; } if (devServerSetting == "http://stg02-app.alcww.gumi.sg/") { this.devServerSetting = 6; } if (devServerSetting == "http://dev06-app.alcww.gumi.sg/") { this.devServerSetting = 7; } if (devServerSetting == "http://stg03-app.alcww.gumi.sg/") { this.devServerSetting = 8; } } InputField.OnChangeEvent onValueChanged = this.DevServer.get_onValueChanged(); // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache37 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache37 = new UnityAction <string>((object)null, __methodptr(\u003CStart\u003Em__351)); } // ISSUE: reference to a compiler-generated field UnityAction <string> fAmCache37 = ConfigWindow.\u003C\u003Ef__am\u0024cache37; ((UnityEvent <string>)onValueChanged).AddListener(fAmCache37); if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.SwitchServer, (UnityEngine.Object)null)) { // ISSUE: method pointer ((UnityEvent)this.SwitchServer.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__352))); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.CrashButton, (UnityEngine.Object)null)) { Button.ButtonClickedEvent onClick = this.CrashButton.get_onClick(); // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache38 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache38 = new UnityAction((object)null, __methodptr(\u003CStart\u003Em__353)); } // ISSUE: reference to a compiler-generated field UnityAction fAmCache38 = ConfigWindow.\u003C\u003Ef__am\u0024cache38; ((UnityEvent)onClick).AddListener(fAmCache38); } } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.LangSetting, (UnityEngine.Object)null) && ((Component)this.LangSetting).get_gameObject().GetActive()) { string configLanguage = GameUtility.Config_Language; if (configLanguage == "english") { this.devLangSetting = 0; } if (configLanguage == "french") { this.devLangSetting = 1; } if (configLanguage == "german") { this.devLangSetting = 2; } if (configLanguage == "spanish") { this.devLangSetting = 3; } this.LangSetting.set_text(configLanguage); InputField.OnChangeEvent onValueChanged = this.LangSetting.get_onValueChanged(); // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache39 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache39 = new UnityAction <string>((object)null, __methodptr(\u003CStart\u003Em__354)); } // ISSUE: reference to a compiler-generated field UnityAction <string> fAmCache39 = ConfigWindow.\u003C\u003Ef__am\u0024cache39; ((UnityEvent <string>)onValueChanged).AddListener(fAmCache39); if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.SwitchLanguage, (UnityEngine.Object)null)) { // ISSUE: method pointer ((UnityEvent)this.SwitchLanguage.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__355))); } } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.MasterCheckButton, (UnityEngine.Object)null)) { ((Component)this.MasterCheckButton).get_gameObject().SetActive(false); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.AwardState, (UnityEngine.Object)null)) { PlayerData player = MonoSingleton <GameManager> .Instance.Player; if (player != null) { DataSource.Bind <PlayerData>(this.AwardState, player); } } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.SupportIcon, (UnityEngine.Object)null)) { UnitData unitDataByUniqueId = MonoSingleton <GameManager> .Instance.Player.FindUnitDataByUniqueID((long)GlobalVars.SelectedSupportUnitUniqueID); if (unitDataByUniqueId != null) { DataSource.Bind <UnitData>(this.SupportIcon, unitDataByUniqueId); } } ConfigWindow.SetupTreasureList(this.TreasureList, this.TreasureListNode, this.Prefab_NewItemBadge, ((Component)this).get_gameObject(), this.mTreasureListNodes); GameParameter.UpdateAll(((Component)this).get_gameObject()); }
public static void AddListener(this Slider.SliderEvent clickEvent, Function funcToExecute) { clickEvent.AddListener(new Action <float>((f) => funcToExecute(f))); }
// Use this for initialization void Start() { LoadAndSetSliderFloat( Preferences.FXVolumeKey, Preferences.Current.FXVolume ); LoadAndSetSliderFloat( Preferences.MusicVolumeKey, Preferences.Current.MusicVolume ); LoadAndSetSliderFloat( Preferences.PlayerSpeedKey, Preferences.Current.PlayerSpeed ); LoadAndSetToggleBool ( Preferences.LiveTilesKey , Preferences.Current.UseLiveTiles ); LoadAndSetToggleBool ( Preferences.XboxLiveKey, Preferences.Current.UseXboxLive ); //Doing this from code just for kicks.. GameObject playerSpeedObject = GameObject.Find(Preferences.PlayerSpeedKey + SliderPostfix); if (playerSpeedObject != null) { Slider slider = playerSpeedObject.GetComponent<Slider>(); Debug.Assert(slider != null); Slider.SliderEvent evt = new Slider.SliderEvent(); evt.AddListener(OnPlayerSpeedValueChanged); } if (!UserFactory.UseIdentity) { GameObject.Find( Preferences.XboxLiveKey + TogglePostfix ).GetComponent<Toggle>().interactable = false; } }
//================================================================================ // 関数(static) //================================================================================ /// <summary> /// リスナーを設定します /// </summary> public static void SetListener(this Slider.SliderEvent self, UnityAction <float> call) { self.RemoveAllListeners(); self.AddListener(call); }
/// <summary> /// <para>リスナーを解除します</para> /// <para>この関数は RemoveListener 関数の省略表記です</para> /// </summary> public static void Remove(this Slider.SliderEvent self, UnityAction <float> call) { self.RemoveListener(call); }
/// <summary> /// <para>リスナーを設定します</para> /// <para>この関数は SetListener 関数の省略表記です</para> /// </summary> public static void Set(this Slider.SliderEvent self, UnityAction <float> call) { self.SetListener(call); }
private void Start() { if (Object.op_Inequality((Object)this.SoundVolume, (Object)null)) { this.SoundVolume.set_value(GameUtility.Config_SoundVolume); Slider.SliderEvent onValueChanged = this.SoundVolume.get_onValueChanged(); // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache20 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache20 = new UnityAction <float>((object)null, __methodptr(\u003CStart\u003Em__25A)); } // ISSUE: reference to a compiler-generated field UnityAction <float> fAmCache20 = ConfigWindow.\u003C\u003Ef__am\u0024cache20; ((UnityEvent <float>)onValueChanged).AddListener(fAmCache20); } if (Object.op_Inequality((Object)this.MusicVolume, (Object)null)) { this.MusicVolume.set_value(GameUtility.Config_MusicVolume); Slider.SliderEvent onValueChanged = this.MusicVolume.get_onValueChanged(); // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache21 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache21 = new UnityAction <float>((object)null, __methodptr(\u003CStart\u003Em__25B)); } // ISSUE: reference to a compiler-generated field UnityAction <float> fAmCache21 = ConfigWindow.\u003C\u003Ef__am\u0024cache21; ((UnityEvent <float>)onValueChanged).AddListener(fAmCache21); } if (Object.op_Inequality((Object)this.VoiceVolume, (Object)null)) { this.VoiceVolume.set_value(GameUtility.Config_VoiceVolume); Slider.SliderEvent onValueChanged = this.VoiceVolume.get_onValueChanged(); // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache22 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache22 = new UnityAction <float>((object)null, __methodptr(\u003CStart\u003Em__25C)); } // ISSUE: reference to a compiler-generated field UnityAction <float> fAmCache22 = ConfigWindow.\u003C\u003Ef__am\u0024cache22; ((UnityEvent <float>)onValueChanged).AddListener(fAmCache22); } if (Object.op_Inequality((Object)this.UseAssetBundle, (Object)null)) { this.UseAssetBundle.set_isOn(GameUtility.Config_UseAssetBundles.Value); // ISSUE: variable of the null type __Null onValueChanged = this.UseAssetBundle.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache23 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache23 = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__25D)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache23 = ConfigWindow.\u003C\u003Ef__am\u0024cache23; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache23); } if (Object.op_Inequality((Object)this.UseDevServer, (Object)null)) { this.UseDevServer.set_isOn(GameUtility.Config_UseDevServer.Value); // ISSUE: variable of the null type __Null onValueChanged = this.UseDevServer.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache24 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache24 = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__25E)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache24 = ConfigWindow.\u003C\u003Ef__am\u0024cache24; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache24); } if (Object.op_Inequality((Object)this.UseStgServer, (Object)null)) { this.UseStgServer.set_isOn(GameUtility.Config_UseStgServer.Value); // ISSUE: variable of the null type __Null onValueChanged = this.UseStgServer.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache25 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache25 = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__25F)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache25 = ConfigWindow.\u003C\u003Ef__am\u0024cache25; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache25); } if (Object.op_Inequality((Object)this.UseAwsServer, (Object)null)) { this.UseAwsServer.set_isOn(GameUtility.Config_UseAwsServer.Value); // ISSUE: variable of the null type __Null onValueChanged = this.UseAwsServer.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache26 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache26 = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__260)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache26 = ConfigWindow.\u003C\u003Ef__am\u0024cache26; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache26); } if (Object.op_Inequality((Object)this.UseAutoPlay, (Object)null)) { this.UseAutoPlay.set_isOn(GameUtility.Config_UseAutoPlay.Value); // ISSUE: variable of the null type __Null onValueChanged = this.UseAutoPlay.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache27 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache27 = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__261)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache27 = ConfigWindow.\u003C\u003Ef__am\u0024cache27; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache27); } if (Object.op_Inequality((Object)this.UsePushStamina, (Object)null)) { this.UsePushStamina.set_isOn(GameUtility.Config_UsePushStamina.Value); // ISSUE: variable of the null type __Null onValueChanged = this.UsePushStamina.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache28 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache28 = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__262)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache28 = ConfigWindow.\u003C\u003Ef__am\u0024cache28; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache28); } if (Object.op_Inequality((Object)this.UsePushNews, (Object)null)) { this.UsePushNews.set_isOn(GameUtility.Config_UsePushNews.Value); // ISSUE: variable of the null type __Null onValueChanged = this.UsePushNews.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache29 == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache29 = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__263)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache29 = ConfigWindow.\u003C\u003Ef__am\u0024cache29; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache29); } if (Object.op_Inequality((Object)this.ToggleChatState, (Object)null)) { this.ToggleChatState.set_isOn(GameUtility.Config_ChatState.Value); // ISSUE: variable of the null type __Null onValueChanged = this.ToggleChatState.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache2A == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache2A = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__264)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache2A = ConfigWindow.\u003C\u003Ef__am\u0024cache2A; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache2A); } if (Object.op_Inequality((Object)this.NewGame, (Object)null)) { this.NewGame.set_isOn(GameUtility.Config_NewGame.Value); // ISSUE: variable of the null type __Null onValueChanged = this.NewGame.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache2B == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache2B = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__265)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache2B = ConfigWindow.\u003C\u003Ef__am\u0024cache2B; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache2B); } if (Object.op_Inequality((Object)this.MultiUserSetting, (Object)null)) { // ISSUE: method pointer ((UnityEvent <bool>) this.MultiUserSetting.onValueChanged).AddListener(new UnityAction <bool>((object)this, __methodptr(\u003CStart\u003Em__266))); ((Component)this.MultiUserSetting).get_gameObject().SetActive(false); ((Component)this.MultiUserName).get_gameObject().SetActive(false); } if (Object.op_Inequality((Object)this.UseLocalMasterData, (Object)null)) { this.UseLocalMasterData.set_isOn(GameUtility.Config_UseLocalData.Value); // ISSUE: variable of the null type __Null onValueChanged = this.UseLocalMasterData.onValueChanged; // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache2C == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache2C = new UnityAction <bool>((object)null, __methodptr(\u003CStart\u003Em__267)); } // ISSUE: reference to a compiler-generated field UnityAction <bool> fAmCache2C = ConfigWindow.\u003C\u003Ef__am\u0024cache2C; ((UnityEvent <bool>)onValueChanged).AddListener(fAmCache2C); ((Component)this.UseLocalMasterData).get_gameObject().SetActive(false); } for (int index = 0; index < this.InputMethods.Length; ++index) { if (Object.op_Inequality((Object)this.InputMethods[index], (Object)null)) { // ISSUE: method pointer ((UnityEvent <bool>) this.InputMethods[index].onValueChanged).AddListener(new UnityAction <bool>((object)this, __methodptr(OnInputMethodChange))); } } MoveInputMethods configInputMethod = GameUtility.Config_InputMethod; if (configInputMethod < (MoveInputMethods)this.InputMethods.Length && Object.op_Inequality((Object)this.InputMethods[(int)configInputMethod], (Object)null)) { this.InputMethods[(int)configInputMethod].set_isOn(true); } if (Object.op_Inequality((Object)this.LoginBonus, (Object)null)) { this.LoginBonus.SetActive(MonoSingleton <GameManager> .Instance.Player.LoginBonus != null); } if (Object.op_Inequality((Object)this.LoginBonus28days, (Object)null)) { this.LoginBonus28days.SetActive(MonoSingleton <GameManager> .Instance.Player.LoginBonus28days != null); } if (Object.op_Inequality((Object)this.DevServer, (Object)null)) { string devServerSetting = GameUtility.DevServerSetting; if (!string.IsNullOrEmpty(devServerSetting)) { this.DevServer.set_text(devServerSetting); if (devServerSetting == "http://dev01-app.alcww.gumi.sg/") { this.devServerSetting = 0; } if (devServerSetting == "http://dev02-app.alcww.gumi.sg/") { this.devServerSetting = 1; } if (devServerSetting == "http://dev03-app.alcww.gumi.sg/") { this.devServerSetting = 2; } if (devServerSetting == "http://dev04-app.alcww.gumi.sg/") { this.devServerSetting = 3; } if (devServerSetting == "http://dev05-app.alcww.gumi.sg/") { this.devServerSetting = 4; } if (devServerSetting == "http://stg-app.alcww.gumi.sg/") { this.devServerSetting = 5; } if (devServerSetting == "http://stg02-app.alcww.gumi.sg/") { this.devServerSetting = 6; } } InputField.OnChangeEvent onValueChanged = this.DevServer.get_onValueChanged(); // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache2D == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache2D = new UnityAction <string>((object)null, __methodptr(\u003CStart\u003Em__268)); } // ISSUE: reference to a compiler-generated field UnityAction <string> fAmCache2D = ConfigWindow.\u003C\u003Ef__am\u0024cache2D; ((UnityEvent <string>)onValueChanged).AddListener(fAmCache2D); if (Object.op_Inequality((Object)this.SwitchServer, (Object)null)) { // ISSUE: method pointer ((UnityEvent)this.SwitchServer.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__269))); } if (Object.op_Inequality((Object)this.CrashButton, (Object)null)) { Button.ButtonClickedEvent onClick = this.CrashButton.get_onClick(); // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache2E == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache2E = new UnityAction((object)null, __methodptr(\u003CStart\u003Em__26A)); } // ISSUE: reference to a compiler-generated field UnityAction fAmCache2E = ConfigWindow.\u003C\u003Ef__am\u0024cache2E; ((UnityEvent)onClick).AddListener(fAmCache2E); } } if (Object.op_Inequality((Object)this.LangSetting, (Object)null) && ((Component)this.LangSetting).get_gameObject().GetActive()) { string configLanguage = GameUtility.Config_Language; if (configLanguage == "english") { this.devLangSetting = 0; } if (configLanguage == "french") { this.devLangSetting = 1; } if (configLanguage == "german") { this.devLangSetting = 2; } if (configLanguage == "spanish") { this.devLangSetting = 3; } this.LangSetting.set_text(configLanguage); InputField.OnChangeEvent onValueChanged = this.LangSetting.get_onValueChanged(); // ISSUE: reference to a compiler-generated field if (ConfigWindow.\u003C\u003Ef__am\u0024cache2F == null) { // ISSUE: reference to a compiler-generated field // ISSUE: method pointer ConfigWindow.\u003C\u003Ef__am\u0024cache2F = new UnityAction <string>((object)null, __methodptr(\u003CStart\u003Em__26B)); } // ISSUE: reference to a compiler-generated field UnityAction <string> fAmCache2F = ConfigWindow.\u003C\u003Ef__am\u0024cache2F; ((UnityEvent <string>)onValueChanged).AddListener(fAmCache2F); if (Object.op_Inequality((Object)this.SwitchLanguage, (Object)null)) { // ISSUE: method pointer ((UnityEvent)this.SwitchLanguage.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(\u003CStart\u003Em__26C))); } } if (Object.op_Inequality((Object)this.MasterCheckButton, (Object)null)) { ((Component)this.MasterCheckButton).get_gameObject().SetActive(false); } if (Object.op_Inequality((Object)this.AwardState, (Object)null)) { PlayerData player = MonoSingleton <GameManager> .Instance.Player; if (player != null) { DataSource.Bind <PlayerData>(this.AwardState, player); } } if (Object.op_Inequality((Object)this.SupportIcon, (Object)null)) { UnitData unitDataByUniqueId = MonoSingleton <GameManager> .Instance.Player.FindUnitDataByUniqueID((long)GlobalVars.SelectedSupportUnitUniqueID); if (unitDataByUniqueId != null) { DataSource.Bind <UnitData>(this.SupportIcon, unitDataByUniqueId); } } this.UpdateChargeDispText(GameUtility.Config_ChargeDisp.Value); GameParameter.UpdateAll(((Component)this).get_gameObject()); }
public void AddOnChangeValue(UnityAction <float> callbackEvent) { Slider.SliderEvent callEvent = new Slider.SliderEvent(); callEvent.AddListener(callbackEvent); _slider.onValueChanged = callEvent; }