本文整理汇总了C#中IHsGameState.PlayersTurn方法的典型用法代码示例。如果您正苦于以下问题:C# IHsGameState.PlayersTurn方法的具体用法?C# IHsGameState.PlayersTurn怎么用?C# IHsGameState.PlayersTurn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IHsGameState
的用法示例。
在下文中一共展示了IHsGameState.PlayersTurn方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TagChange
//.........这里部分代码省略.........
gameState.GameHandler.HandlePlayerBackToHand(game.Entities[id], cardId, gameState.GetTurnNumber());
gameState.ProposeKeyPoint(PlayToHand, id, ActivePlayer.Player);
}
else if(controller == game.Opponent.Id)
{
gameState.GameHandler.HandleOpponentPlayToHand(game.Entities[id], cardId, gameState.GetTurnNumber(), id);
gameState.ProposeKeyPoint(PlayToHand, id, ActivePlayer.Opponent);
}
break;
case DECK:
if(controller == game.Player.Id)
{
gameState.GameHandler.HandlePlayerPlayToDeck(game.Entities[id], cardId, gameState.GetTurnNumber());
gameState.ProposeKeyPoint(PlayToDeck, id, ActivePlayer.Player);
}
else if(controller == game.Opponent.Id)
{
gameState.GameHandler.HandleOpponentPlayToDeck(game.Entities[id], cardId, gameState.GetTurnNumber());
gameState.ProposeKeyPoint(PlayToDeck, id, ActivePlayer.Opponent);
}
break;
case REMOVEDFROMGAME:
case SETASIDE:
case GRAVEYARD:
if(controller == game.Player.Id)
{
gameState.GameHandler.HandlePlayerPlayToGraveyard(game.Entities[id], cardId, gameState.GetTurnNumber());
if(game.Entities[id].HasTag(HEALTH))
gameState.ProposeKeyPoint(Death, id, ActivePlayer.Player);
}
else if(controller == game.Opponent.Id)
{
gameState.GameHandler.HandleOpponentPlayToGraveyard(game.Entities[id], cardId, gameState.GetTurnNumber(),
gameState.PlayersTurn());
if(game.Entities[id].HasTag(HEALTH))
gameState.ProposeKeyPoint(Death, id, ActivePlayer.Opponent);
}
break;
default:
Logger.WriteLine($"WARNING - unhandled zone change (id={id}): {prevValue} -> {value}", "TagChange");
break;
}
break;
case TAG_ZONE.SECRET:
switch((TAG_ZONE)value)
{
case TAG_ZONE.SECRET:
case GRAVEYARD:
if(controller == game.Player.Id)
gameState.ProposeKeyPoint(SecretTriggered, id, ActivePlayer.Player);
if(controller == game.Opponent.Id)
{
gameState.GameHandler.HandleOpponentSecretTrigger(game.Entities[id], cardId, gameState.GetTurnNumber(), id);
gameState.ProposeKeyPoint(SecretTriggered, id, ActivePlayer.Opponent);
}
break;
default:
Logger.WriteLine($"WARNING - unhandled zone change (id={id}): {prevValue} -> {value}", "TagChange");
break;
}
break;
case GRAVEYARD:
case SETASIDE:
case CREATED:
case TAG_ZONE.INVALID:
case REMOVEDFROMGAME:
示例2: ZoneChangeFromPlay
private static void ZoneChangeFromPlay(IHsGameState gameState, int id, IGame game, int value, int prevValue, int controller,
string cardId)
{
switch((TAG_ZONE)value)
{
case HAND:
if(controller == game.Player.Id)
{
gameState.GameHandler.HandlePlayerBackToHand(game.Entities[id], cardId, gameState.GetTurnNumber());
gameState.ProposeKeyPoint(PlayToHand, id, ActivePlayer.Player);
}
else if(controller == game.Opponent.Id)
{
gameState.GameHandler.HandleOpponentPlayToHand(game.Entities[id], cardId, gameState.GetTurnNumber(), id);
gameState.ProposeKeyPoint(PlayToHand, id, ActivePlayer.Opponent);
}
break;
case DECK:
if(controller == game.Player.Id)
{
gameState.GameHandler.HandlePlayerPlayToDeck(game.Entities[id], cardId, gameState.GetTurnNumber());
gameState.ProposeKeyPoint(PlayToDeck, id, ActivePlayer.Player);
}
else if(controller == game.Opponent.Id)
{
gameState.GameHandler.HandleOpponentPlayToDeck(game.Entities[id], cardId, gameState.GetTurnNumber());
gameState.ProposeKeyPoint(PlayToDeck, id, ActivePlayer.Opponent);
}
break;
case REMOVEDFROMGAME:
case SETASIDE:
case GRAVEYARD:
if(controller == game.Player.Id)
{
gameState.GameHandler.HandlePlayerPlayToGraveyard(game.Entities[id], cardId, gameState.GetTurnNumber());
if(game.Entities[id].HasTag(HEALTH))
gameState.ProposeKeyPoint(Death, id, ActivePlayer.Player);
}
else if(controller == game.Opponent.Id)
{
gameState.GameHandler.HandleOpponentPlayToGraveyard(game.Entities[id], cardId, gameState.GetTurnNumber(), gameState.PlayersTurn());
if(game.Entities[id].HasTag(HEALTH))
gameState.ProposeKeyPoint(Death, id, ActivePlayer.Opponent);
}
break;
default:
Log.Warn($"unhandled zone change (id={id}): {prevValue} -> {value}");
break;
}
}
示例3: PredamageChange
private static void PredamageChange(IHsGameState gameState, int id, IGame game, int value)
{
if(value <= 0)
return;
if(gameState.PlayersTurn())
gameState.GameHandler.HandleOpponentDamage(game.Entities[id]);
}
示例4: NumTurnsInPlayChange
private static void NumTurnsInPlayChange(IHsGameState gameState, int id, IGame game, int value)
{
if(value <= 0)
return;
if(!gameState.PlayersTurn())
gameState.GameHandler.HandleOpponentTurnStart(game.Entities[id]);
}
示例5: NumMinionsPlayedThisTurnChange
private static void NumMinionsPlayedThisTurnChange(IHsGameState gameState, int value)
{
if(value <= 0)
return;
if(gameState.PlayersTurn())
gameState.GameHandler.HandlePlayerMinionPlayed();
}