本文整理汇总了C#中Hearthstone_Deck_Tracker.Hearthstone.Entities.Entity类的典型用法代码示例。如果您正苦于以下问题:C# Entity类的具体用法?C# Entity怎么用?C# Entity使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Entity类属于Hearthstone_Deck_Tracker.Hearthstone.Entities命名空间,在下文中一共展示了Entity类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EntityBuilder
public EntityBuilder(string cardid, int attack, int health)
{
_instance = new Entity();
_instance.SetTag(GameTag.ATK, attack);
_instance.SetTag(GameTag.HEALTH, health);
_cardId = cardid;
}
示例2: IsHero
public static bool IsHero(Entity e)
{
return e.HasTag(GAME_TAG.CARDTYPE)
&& e.GetTag(GAME_TAG.CARDTYPE) == (int)TAG_CARDTYPE.HERO
&& e.HasTag(GAME_TAG.ZONE)
&& e.GetTag(GAME_TAG.ZONE) == (int)TAG_ZONE.PLAY;
}
示例3: ReplayKeyPoint
public ReplayKeyPoint(Entity[] data, KeyPointType type, int id, ActivePlayer player)
{
if(data != null)
Data = Helper.DeepClone(data);
Type = type;
Id = id;
Player = player;
}
示例4: BoardHero
public BoardHero(Entity hero, Entity weapon, bool activeTurn)
{
_hero = new BoardCard(hero, activeTurn);
// hero gains windfury with weapon, doubling attack get base attack
_baseAttack = hero.GetTag(GameTag.ATK);
if(weapon != null)
_weapon = new BoardCard(weapon, activeTurn);
Include = activeTurn && _hero.Include;
Attack = AttackWithWeapon();
}
示例5: Setup
public void Setup()
{
_game = new GameV2();
_gameEventHandler = new GameEventHandler(_game);
_heroPlayer = CreateNewEntity("HERO_01");
_heroPlayer.SetTag(GAME_TAG.CARDTYPE, (int) TAG_CARDTYPE.HERO);
_heroPlayer.IsPlayer = true;
_heroOpponent = CreateNewEntity("HERO_02");
_heroOpponent.SetTag(GAME_TAG.CARDTYPE, (int) TAG_CARDTYPE.HERO);
_heroOpponent.IsPlayer = false;
_game.Entities.Add(0, _heroPlayer);
_game.Player.Id = _heroPlayer.Id;
_game.Entities.Add(1, _heroOpponent);
_game.Opponent.Id = _heroOpponent.Id;
_playerMinion1 = CreateNewEntity("EX1_010");
_playerMinion1.SetTag(GAME_TAG.CARDTYPE, (int)TAG_CARDTYPE.MINION);
_playerMinion1.SetTag(GAME_TAG.CONTROLLER, _heroPlayer.Id);
_opponentMinion1 = CreateNewEntity("EX1_020");
_opponentMinion1.SetTag(GAME_TAG.CARDTYPE, (int)TAG_CARDTYPE.MINION);
_opponentMinion1.SetTag(GAME_TAG.CONTROLLER, _heroOpponent.Id);
_opponentMinion2 = CreateNewEntity("EX1_021");
_opponentMinion2.SetTag(GAME_TAG.CARDTYPE, (int)TAG_CARDTYPE.MINION);
_opponentMinion2.SetTag(GAME_TAG.CONTROLLER, _heroOpponent.Id);
_game.Entities.Add(2, _playerMinion1);
_game.Entities.Add(3, _opponentMinion1);
_game.Entities.Add(4, _opponentMinion2);
_secretHunter1 = CreateNewEntity("");
_secretHunter1.SetTag(GAME_TAG.CLASS, (int) TAG_CLASS.HUNTER);
_secretHunter2 = CreateNewEntity("");
_secretHunter2.SetTag(GAME_TAG.CLASS, (int) TAG_CLASS.HUNTER);
_secretMage1 = CreateNewEntity("");
_secretMage1.SetTag(GAME_TAG.CLASS, (int) TAG_CLASS.MAGE);
_secretMage2 = CreateNewEntity("");
_secretMage2.SetTag(GAME_TAG.CLASS, (int) TAG_CLASS.MAGE);
_secretPaladin1 = CreateNewEntity("");
_secretPaladin1.SetTag(GAME_TAG.CLASS, (int) TAG_CLASS.PALADIN);
_secretPaladin2 = CreateNewEntity("");
_secretPaladin2.SetTag(GAME_TAG.CLASS, (int) TAG_CLASS.PALADIN);
_gameEventHandler.HandleOpponentSecretPlayed(_secretHunter1, "", 0, 0, false, _secretHunter1.Id);
_gameEventHandler.HandleOpponentSecretPlayed(_secretMage1, "", 0, 0, false, _secretMage1.Id);
_gameEventHandler.HandleOpponentSecretPlayed(_secretPaladin1, "", 0, 0, false, _secretPaladin1.Id);
}
示例6: Setup
public void Setup()
{
_entities = new Dictionary<int, Entity>();
_entities[0] = new Entity(0);
_entities[0].SetTag(GameTag.FIRST_PLAYER, 1);
_entities[0].IsPlayer = true;
_entities[1] = new Entity(1);
_entities[1].Name = "GameEntity";
_entities[1].SetTag(GameTag.TURN, 11);
_player = new List<Entity>();
_player.Add(new EntityBuilder("", 3, 1).InPlay().Charge().ToEntity());
_player.Add(new EntityBuilder("", 4, 5).InPlay().ToEntity());
_player.Add(new EntityBuilder("", 3, 2).InPlay().Exhausted().ToEntity());
_opponent = new List<Entity>();
_opponent.Add(new EntityBuilder("", 7, 5).InPlay().ToEntity());
_opponent.Add(new EntityBuilder("", 3, 1).InPlay().Windfury().AttacksThisTurn(1).ToEntity());
_opponent.Add(new EntityBuilder("", 2, 2).InPlay().Exhausted().ToEntity());
}
示例7: Setup
public void Setup()
{
Core.Game = null;
_game = new GameV2();
Core.Game = _game;
_game.Player.Id = 0;
_entities = new Dictionary<int, Entity>();
_entities[0] = new Entity(0);
_entities[0].SetTag(GameTag.FIRST_PLAYER, 1);
_entities[1] = new Entity(1);
_entities[1].Name = "GameEntity";
_entities[1].SetTag(GameTag.TURN, 11);
_heroA = new Entity(4);
_heroA.CardId = "HERO_08";
_heroA.Name = null;
_heroA.SetTag(GameTag.HEALTH, 30);
_heroA.SetTag(GameTag.ZONE, 1);
_heroA.SetTag(GameTag.CONTROLLER, 1);
_heroA.SetTag(GameTag.ENTITY_ID, 4);
_heroA.SetTag(GameTag.CARDTYPE, 3);
_heroA.SetTag(GameTag.DAMAGE, 7);
_heroA.SetTag(GameTag.ARMOR, 0);
_heroB = new Entity(36);
_heroB.CardId = "HERO_03";
_heroB.Name = null;
_heroB.SetTag(GameTag.HEALTH, 30);
_heroB.SetTag(GameTag.ZONE, 1);
_heroB.SetTag(GameTag.CONTROLLER, 2);
_heroB.SetTag(GameTag.ENTITY_ID, 36);
_heroB.SetTag(GameTag.CARDTYPE, 3);
_heroB.SetTag(GameTag.DAMAGE, 14);
_heroB.SetTag(GameTag.ARMOR, 0);
_heroB.SetTag(GameTag.ATK, 1);
_heroB.SetTag(GameTag.EXHAUSTED, 1);
}
示例8: PlayToGraveyard
public void PlayToGraveyard(Entity entity, string cardId, int turn)
{
entity.Info.Turn = turn;
Log(entity);
}
示例9: RemoveFromPlay
public void RemoveFromPlay(Entity entity, int turn)
{
entity.Info.Turn = turn;
Log(entity);
}
示例10: SecretPlayedFromDeck
public void SecretPlayedFromDeck(Entity entity, int turn)
{
UpdateKnownEntitesInDeck(entity.CardId);
entity.Info.Turn = turn;
Log(entity);
}
示例11: SecretPlayedFromHand
public void SecretPlayedFromHand(Entity entity, int turn)
{
entity.Info.Turn = turn;
SpellsPlayedCount++;
Log(entity);
}
示例12: Draw
public void Draw(Entity entity, int turn)
{
if(IsLocalPlayer)
UpdateKnownEntitesInDeck(entity.CardId);
if(!IsLocalPlayer)
{
if(_game.OpponentEntity?.GetTag(GameTag.MULLIGAN_STATE) == (int)HearthDb.Enums.Mulligan.DEALING)
entity.Info.Mulliganed = true;
else
entity.Info.Hidden = true;
}
entity.Info.Turn = turn;
Log(entity);
}
示例13: SecretTriggered
public void SecretTriggered(Entity entity, int turn)
{
entity.Info.Turn = turn;
Log(entity);
}
示例14: CardEntity
public CardEntity(string cardId, Entity entity)
{
CardId = (string.IsNullOrEmpty(cardId) && entity != null) ? entity.CardId : cardId;
Entity = entity;
Turn = -1;
CardMark = (entity != null && entity.Id > 68) ? CardMark.Created : CardMark.None;
}
示例15: DeckToPlay
public void DeckToPlay(Entity entity, int turn)
{
UpdateKnownEntitesInDeck(entity.CardId);
entity.Info.Turn = turn;
Log(entity);
}