本文整理汇总了C#中User.ToAbsolutePlayer方法的典型用法代码示例。如果您正苦于以下问题:C# User.ToAbsolutePlayer方法的具体用法?C# User.ToAbsolutePlayer怎么用?C# User.ToAbsolutePlayer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类User
的用法示例。
在下文中一共展示了User.ToAbsolutePlayer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ExecuteMovesFor
public static void ExecuteMovesFor(Game game, User user)
{
ExecuteMoves(game, user.ToAbsolutePlayer(game) == AbsolutePlayer.Recepient);
}
示例2: IsValidMoveFor
public static bool IsValidMoveFor(User user, Game game, Coord move)
{
return game.WaitingOn.ToRelativePlayer(user, game) == RelativePlayer.Friendly && IsValidMove(game, move, user.ToAbsolutePlayer(game) == AbsolutePlayer.Recepient);
}
示例3: SetOtherPlayerInfo
// TODO this should be going off of email instead of name since name isn't unique
public static void SetOtherPlayerInfo(User user, Game game)
{
if (user.ToAbsolutePlayer(game) == AbsolutePlayer.Initiator)
{
game.OtherPlayerName = game.RecepientPlayerName;
game.OtherPlayerPicSource = game.RecepientPlayerPicSource;
game.ThisPlayerPicSource = game.InitiaitingPlayerPicSource;
}
else
{
game.OtherPlayerName = game.InitiatingPlayerName;
game.OtherPlayerPicSource = game.InitiaitingPlayerPicSource;
game.ThisPlayerPicSource = game.RecepientPlayerPicSource;
}
}