本文整理汇总了C#中GameState.GetTag方法的典型用法代码示例。如果您正苦于以下问题:C# GameState.GetTag方法的具体用法?C# GameState.GetTag怎么用?C# GameState.GetTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameState
的用法示例。
在下文中一共展示了GameState.GetTag方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Parse
public bool Parse(GameState game, GameState.Entity entity)
{
bool ret = true;
ret = this.crystal.Parse(game, entity) && ret;
this.fatigue = entity.GetTagOrDefault(GameTag.FATIGUE, 0);
this.first_player = (entity.GetTagOrDefault(GameTag.FIRST_PLAYER, 0) != 0);
ret = this.enchantments.Parse(game, entity) && ret;
if (entity.HasTag(GameTag.HERO_ENTITY) == false) ret = false;
else
{
int hero_entity_id = entity.GetTag(GameTag.HERO_ENTITY);
if (game.Entities.ContainsKey(hero_entity_id) == false) ret = false;
else {
ret = this.hero.Parse(game, game.Entities[hero_entity_id]) && ret;
}
}
ret = this.weapon.Parse(game, entity) && ret;
ret = this.secrets.Parse(game, entity) && ret;
ret = this.minions.Parse(game, entity) && ret;
ret = this.hand.Parse(game, entity) && ret;
ret = this.deck.Parse(game, entity) && ret;
return ret;
}
示例2: Parse
public bool Parse(GameState game, GameState.Entity entity)
{
bool ret = true;
this.card_id = entity.CardId;
if (entity.HasTag(GameTag.CLASS) == false)
{
[email protected] = "";
}
else
{
[email protected] = ((TAG_CLASS)entity.GetTag(GameTag.CLASS)).ToString();
}
return ret;
}