本文整理匯總了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;
}