Code/SbTween/Examples/SbeFloatTest.cs

A simple example component that starts a looping float tween on a HighlightOutline property. OnStart sets up a tween that animates HO.Width between 0.18 and 0.46 over 0.5s with linear easing and infinite yo-yo loops.

Reflection
using Sandbox;
using SbTween;


namespace SbTween.Examples;

public sealed class SbeFloatTest : Component
{
	[Property] public HighlightOutline HO;

	protected override void OnStart()
	{
		this.GameObject.TweenFloat( 0.18f, 0.46f, 0.5f, ( val ) => HO.Width = val ).SetEase(EaseType.Linear).SetLoops(-1, LoopType.YoYo);
	}
}