mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-20 15:41:01 +00:00
add onAddPlayer event
This commit is contained in:
parent
d9eba599f9
commit
5c0ba4574b
@ -35,6 +35,7 @@ namespace QSB.Player
|
||||
}
|
||||
|
||||
public static Action<uint> OnRemovePlayer;
|
||||
public static Action<uint> OnAddPlayer;
|
||||
|
||||
public static PlayerInfo LocalPlayer => GetPlayer(LocalPlayerId);
|
||||
public static List<PlayerInfo> PlayerList { get; } = new List<PlayerInfo>();
|
||||
@ -69,6 +70,7 @@ namespace QSB.Player
|
||||
DebugLog.DebugWrite($"Create Player : id<{id}> Stacktrace :\r\n{Environment.StackTrace}", MessageType.Info);
|
||||
player = new PlayerInfo(id);
|
||||
PlayerList.Add(player);
|
||||
OnAddPlayer?.Invoke(id);
|
||||
return player;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user