SbTween/Examples/SBECubeTL.cs

A small example component for the SbTween library, attached to an entity. On start it tweens the entity's position by a configurable Vector3 over 3 seconds with linear easing and infinite yo-yo loops.

using Sandbox;
using SbTween;

namespace SbTween.Examples;

public sealed class SBECubeTL : Component
{
	[Property] public Vector3 vectorUP;

	protected override void OnStart()
	{
		this.TweenMove( vectorUP, 3 ).SetEase( EaseType.Linear ).SetLoops(-1, LoopType.YoYo ).Play();
	}
	
}