Exemplo n.º 1
0
 private void Awake()
 {
     _wait             = new WaitForSeconds(waitTime);
     _takeDamageEffect = new EffectBuilder(this);
     _takeDamageEffect
     .AddEffect(new ShakeRectEffect(slider.GetComponent <RectTransform>(), maxShakeRotation, shakeSpeed, OnEffectComplete))
     .AddEffect(new FlashColorEffect(sliderFill.color, takeDamageColor, sliderFill, _wait))
     .AddEffect(new ScaleRectEffect(slider.GetComponent <RectTransform>(), maxScaleSize, scaleSpeed, _wait))
     .OnAllEffectsComplete += OnAllEffectsComplete;
 }