本文整理匯總了C#中GameState.TryGetPlayerHeroPowerEntity方法的典型用法代碼示例。如果您正苦於以下問題:C# GameState.TryGetPlayerHeroPowerEntity方法的具體用法?C# GameState.TryGetPlayerHeroPowerEntity怎麽用?C# GameState.TryGetPlayerHeroPowerEntity使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類GameState
的用法示例。
在下文中一共展示了GameState.TryGetPlayerHeroPowerEntity方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Parse
public bool Parse(GameState game, GameState.Entity entity)
{
bool ret = true;
this.card_id = entity.CardId;
this.max_hp = entity.GetTagOrDefault(GameTag.HEALTH, -1);
this.damage = entity.GetTagOrDefault(GameTag.DAMAGE, 0);
this.armor = entity.GetTagOrDefault(GameTag.ARMOR, 0);
this.attack = entity.GetTagOrDefault(GameTag.ATK, 0);
this.attacks_this_turn = entity.GetTagOrDefault(GameTag.NUM_ATTACKS_THIS_TURN, 0);
ret = this.status.Parse(game, entity) && ret;
GameState.Entity hero_power;
if (game.TryGetPlayerHeroPowerEntity(entity.Id, out hero_power))
{
this.hero_power.Parse(game, hero_power);
}
else
{
ret = false;
}
ret = this.enchantments.Parse(game, entity) && ret;
return ret;
}