GameMode/Stats/PlayerExp/FExpEvent.cs

Defines two event types used for player experience: FExpEvent is a readonly struct carrying an Amount and Origin for awarding experience, and LevelUpEvent is a simple record (implements IGameEvent) that signals a player leveled up with the new Level.

using Sandbox.Events;

namespace KOTH.PlayerExp;

/// <summary>
/// Event for broadcasting exp for players
/// </summary>
/// <param name="Amount">Amount of exp</param>
/// <param name="Origin">Where the exp originated from</param>
public readonly struct FExpEvent
{
	public int Amount { get; init; }
	public ExpOrigins Origin { get; init; }
}

/// <summary>
/// Event for broadcasting player level-up notifications.
/// </summary>
/// <param name="Level">The new level the player has achieved</param>
public record LevelUpEvent(int Level) : IGameEvent;