A small game component that starts a continuous rotation tween on the entity when the component starts. It uses SbTween to rotate by 180 degrees on the Y axis over 1 second, applies a configurable easing type, and loops indefinitely.
using Sandbox;
using SbTween;
namespace SbTween.Examples;
public sealed class SbecubeTR : Component
{
[Property] public EaseType easingType;
protected override void OnStart()
{
this.TweenRotate(Rotation.From(0,180,0), 1).SetEase( easingType ).SetLoops(-1).Play();
}
}