|
|
@@ -17,6 +17,7 @@ namespace GamecraftModdingAPI |
|
|
|
{ |
|
|
|
// static functionality |
|
|
|
private static PlayerEngine playerEngine = new PlayerEngine(); |
|
|
|
private static Player localPlayer; |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// Checks if the specified player exists. |
|
|
@@ -54,6 +55,19 @@ namespace GamecraftModdingAPI |
|
|
|
return (uint) playerEngine.GetAllPlayerCount(); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// Returns the current player belonging to this client. |
|
|
|
/// </summary> |
|
|
|
public static Player LocalPlayer |
|
|
|
{ |
|
|
|
get |
|
|
|
{ |
|
|
|
if (localPlayer == null || localPlayer.Id != playerEngine.GetLocalPlayer()) |
|
|
|
localPlayer = new Player(PlayerType.Local); |
|
|
|
return localPlayer; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// Initializes a new instance of the <see cref="T:GamecraftModdingAPI.Player"/> class. |
|
|
|
/// </summary> |
|
|
|