mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-01-06 21:38:32 -05:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
26 lines
760 B
C#
26 lines
760 B
C#
namespace Sandbox;
|
|
|
|
/// <summary>
|
|
/// A generic event listener. You are probably looking for Sandbox.Event.* attributes.
|
|
/// </summary>
|
|
[AttributeUsage( AttributeTargets.Method, Inherited = true, AllowMultiple = true )]
|
|
public class EventAttribute : System.Attribute
|
|
{
|
|
/// <summary>
|
|
/// The internal event identifier.
|
|
/// </summary>
|
|
public string EventName { get; set; }
|
|
|
|
/// <summary>
|
|
/// Events with lower numbers are run first. This defaults to 0, so setting it to -1 will mean your
|
|
/// event will run before all other events that don't define it. Setting it to 1 would mean it'll
|
|
/// run after all events that don't.
|
|
/// </summary>
|
|
public int Priority { get; set; }
|
|
|
|
public EventAttribute( string eventName )
|
|
{
|
|
EventName = eventName;
|
|
}
|
|
}
|