OpenRA.GameInformation.GetPlayer C# (CSharp) 메소드

GetPlayer() 공개 메소드

Gets the player information for the specified runtime player instance.
public GetPlayer ( OpenRA runtimePlayer ) : Player
runtimePlayer OpenRA
리턴 Player
        public Player GetPlayer(OpenRA.Player runtimePlayer)
        {
            Player player;

            playersByRuntime.TryGetValue(runtimePlayer, out player);

            return player;
        }

Usage Example

예제 #1
0
        public void OnPlayerWinStateChanged(Player player)
        {
            var pi = gameInfo.GetPlayer(player);

            if (pi != null)
            {
                pi.Outcome             = player.WinState;
                pi.OutcomeTimestampUtc = DateTime.UtcNow;
            }
        }