using System;
namespace Ashwild.Network
{
///
/// A tiny static hub for "another player joined / left my session" notifications, kept separate
/// from PlayerEvents on purpose: PlayerEvents represents the LOCAL owned player and §3 forbids a
/// remote player copy from driving it. These events are raised by SessionPresenceNotifier on the
/// networked player copies (a local-client view of the session roster) and consumed by the game
/// scene's presence feed UI. Names are already resolved display names, ready to show.
///
public static class SessionPresenceEvents
{
#region Events
///
/// A remote player just joined the session — carries their display name.
///
public static event Action PlayerJoined;
///
/// A remote player just left the session — carries their display name.
///
public static event Action PlayerLeft;
#endregion
#region Raisers
///
/// Announces that a remote player joined, to whoever is listening on this client.
///
public static void RaisePlayerJoined(string playerName) => PlayerJoined?.Invoke(playerName);
///
/// Announces that a remote player left, to whoever is listening on this client.
///
public static void RaisePlayerLeft(string playerName) => PlayerLeft?.Invoke(playerName);
#endregion
}
}