private void OnEnable() { if (valueVariable != null) { valueVariable.AddListener(HandleVariable); } }
private void OnEnable() { if (spriteVariable != null) { spriteVariable.AddListener(HandleSprite); } if (colorVariable != null) { colorVariable.AddListener(HandleColor); } if (fillAmountVariable != null) { fillAmountVariable.AddListener(HandleFillAmount); } if (raycastTargetVariable != null) { raycastTargetVariable.AddListener(HandleRaycast); } if (imageTypeVariable != null) { imageTypeVariable.AddListener(HandleImageType); } }
protected override void Awake() { base.Awake(); //subscribe to events masterVolume.AddListener(UpdateMasterVolume); musicVolume.AddListener(UpdateMusicVolume); sfxVolume.AddListener(UpdateSFXVolume); voiceVolume.AddListener(UpdateVoiceVolume); }
public void Register() { if (gameEvent != null) { gameEvent.AddListener(Handler); } if (variable != null) { variable.AddListener(HandleVariable); } }
private void OnEnable() { targetSlider = GetComponent <UnityEngine.UI.Slider>(); targetSlider.onValueChanged.AddListener(HandleValueChanged); if (value != null) { value.AddListener(HandleVariableChange); } Refresh(); }
private void OnEnable() { targetImage = GetComponent <UnityEngine.UI.Image>(); if (fillAmount != null) { fillAmount.AddListener(HandleFillAmountChange); } if (color != null) { color.AddListener(HandleColorChange); } if (sprite != null) { sprite.AddListener(HandleSpriteChange); } Refresh(); }