SbTween/Examples/SbeCubeSpiral.cs

A small example component that starts a spiral tween on its GameObject when the component starts. It exposes axis, speed, and frequency as properties and calls GameObject.TweenSpiral with fixed radius and infinite yo-yo loops.

using Sandbox;

namespace SbTween.Examples;

public sealed class SbeCubeSpiral : Component
{
	[Property] public Vector3 axis;
	[Property] public float speed;
	[Property] public float frequency;

	protected override void OnStart()
	{
		GameObject.TweenSpiral( 4, axis, speed, frequency ).SetLoops(-1, LoopType.YoYo ).Play();
	}
}