SbTween/Examples/SbeScreenTween.cs

A small example component for the SbTween UI tweening library. It grabs a ScreenPanel referenced via a property and on start applies looping opacity and size tweens that yo-yo forever.

Native Interop
using Sandbox;
using SbTween;

namespace SbTween.Examples;

public sealed class SbeScreenTween : Component
{
	[Property] public ScreenPanel SP;

	protected override void OnStart()
	{
		SP.TweenOpacity(0,1).SetLoops( -1, LoopType.YoYo ).Play();
		SP.TweenSize(1.4f, 1).SetLoops( -1, LoopType.YoYo ).Play();
	}
}