Files
pgs/Assets/Plugins/Febucci/Text Animator/Effects/Appearance Effects/Defaults/RotatingAppearance.cs

31 lines
769 B
C#
Raw Normal View History

2026-02-21 16:58:22 -08:00
using UnityEngine;
namespace Febucci.UI.Core
{
[UnityEngine.Scripting.Preserve]
[EffectInfo(tag: TAnimTags.ap_Rot)]
class RotatingAppearance : AppearanceBase
{
float targetAngle;
public override void SetDefaultValues(AppearanceDefaultValues data)
{
effectDuration = data.defaults.rotationDuration;
targetAngle = data.defaults.rotationStartAngle;
}
public override void ApplyEffect(ref CharacterData data, int charIndex)
{
data.vertices.RotateChar(
Mathf.Lerp(
targetAngle,
0,
Tween.EaseInOut(data.passedTime / effectDuration)
)
);
}
}
}