Player/Player.Static.cs

Partial Player component for the game. It stores a static reference to the local player and provides FindLocalPlayer which returns that reference.

using System;
using System.Collections.Generic;
using System.Text;

namespace SnowSandbox;

public sealed partial class Player : Component
{
	private static Player LocalPlayer { get; set; }

	public static Player FindLocalPlayer() => LocalPlayer;
}