コード例 #1
0
 private Tween ToDamagedHp(TargetData targetData)
 {
     return(DOTween.To(
                () => targetData.HpSlider.value,
                value => targetData.HpSlider.value = value,
                CalculateDamagedHpSlider(targetData.BattleObject),
                0.5f));
 }
コード例 #2
0
        private Tween FadeOutDamagedEffect(TargetData targetData, int index)
        {
            var reactionEffectGameObject = index == 1
                ? targetData.ReactionEffectType1GameObject
                : targetData.ReactionEffectType2GameObject;
            var damagedEffectCanvasGroup = reactionEffectGameObject.GetComponent <CanvasGroup>();

            return(DOTween.To(
                       () => damagedEffectCanvasGroup.alpha,
                       value => damagedEffectCanvasGroup.alpha = value,
                       0,
                       0.5f));
        }