A small component representing a functional button entity. It exposes a Doo property named Pressed and invokes RunDoo when a player interacts via IPlayerInteract.IPress.
using Sandbox;
using SnowSandbox;
[Category( "Functional" )]
[Icon( "radio_button_checked" )]
public sealed class FuncButton : Component, IPlayerInteract
{
[Property]
public Doo Pressed { get; set; }
void IPlayerInteract.IPress()
{
RunDoo(Pressed);
}
}