SbTween/Examples/Light/Sbe_LightColor.cs

A small example component that changes a PointLight's color. OnStart it starts a tween to the provided newColor over 1 second, loops indefinitely with a YoYo loop, and plays it.

using Sandbox;

namespace SbTween.Examples;

public sealed class Sbe_LightColor : Component
{

	[Property] public PointLight PL;
	[Property] public Color newColor;


	protected override void OnStart()
	{
		PL.TweenLightColor( newColor, 1 ).SetLoops( -1, LoopType.YoYo ).Play();
	}

}