SbTween/Examples/SbeNetworkTest.cs

A small Sandbox component example that starts a repeating tweened movement on Start. It declares a Vector3 property 'location' and in OnStart, if the instance is not a proxy, it creates a TweenMove to the location with linear easing and infinite yo-yo loops and plays it. The method is marked with [Rpc.Broadcast].

Networking
using Sandbox;
using SbTween;

namespace SbTween.Examples;

public sealed class SbeNetworkTest : Component
{
	[Property] public Vector3 location;


	[Rpc.Broadcast]
	protected override void OnStart()
	{
		if ( !IsProxy )
		{
			this.TweenMove( location, 1 ).SetEase( EaseType.Linear ).SetLoops( -1, LoopType.YoYo ).Play();
		}
	}
}