当前位置: 首页>>代码示例>>C#>>正文


C# Entities.Entity类代码示例

本文整理汇总了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;
		}
开发者ID:ChuckJrster,项目名称:Hearthstone-Deck-Tracker,代码行数:7,代码来源:TestHelper.cs

示例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;
		}
开发者ID:natorius,项目名称:Hearthstone-Deck-Tracker,代码行数:7,代码来源:EntityHelper.cs

示例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;
		}
开发者ID:ChuckJrster,项目名称:Hearthstone-Deck-Tracker,代码行数:8,代码来源:ReplayKeyPoint.cs

示例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();
		}
开发者ID:ChuckJrster,项目名称:Hearthstone-Deck-Tracker,代码行数:10,代码来源:BoardHero.cs

示例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);
        }
开发者ID:natorius,项目名称:Hearthstone-Deck-Tracker,代码行数:48,代码来源:SecretTests.cs

示例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());
		}
开发者ID:clemgaut,项目名称:Hearthstone-Deck-Tracker,代码行数:20,代码来源:BoardStateTest.cs

示例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);
		}
开发者ID:ChuckJrster,项目名称:Hearthstone-Deck-Tracker,代码行数:39,代码来源:EntityHelperTest.cs

示例8: PlayToGraveyard

		public void PlayToGraveyard(Entity entity, string cardId, int turn)
		{
			entity.Info.Turn = turn;
			Log(entity);
		}
开发者ID:clemgaut,项目名称:Hearthstone-Deck-Tracker,代码行数:5,代码来源:Player.cs

示例9: RemoveFromPlay

		public void RemoveFromPlay(Entity entity, int turn)
		{
			entity.Info.Turn = turn;
			Log(entity);
		}
开发者ID:clemgaut,项目名称:Hearthstone-Deck-Tracker,代码行数:5,代码来源:Player.cs

示例10: SecretPlayedFromDeck

		public void SecretPlayedFromDeck(Entity entity, int turn)
		{
			UpdateKnownEntitesInDeck(entity.CardId);
			entity.Info.Turn = turn;
			Log(entity);
		}
开发者ID:clemgaut,项目名称:Hearthstone-Deck-Tracker,代码行数:6,代码来源:Player.cs

示例11: SecretPlayedFromHand

		public void SecretPlayedFromHand(Entity entity, int turn)
		{
			entity.Info.Turn = turn;
			SpellsPlayedCount++;
			Log(entity);
		}
开发者ID:clemgaut,项目名称:Hearthstone-Deck-Tracker,代码行数:6,代码来源:Player.cs

示例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);
		}
开发者ID:clemgaut,项目名称:Hearthstone-Deck-Tracker,代码行数:14,代码来源:Player.cs

示例13: SecretTriggered

		public void SecretTriggered(Entity entity, int turn)
		{
			entity.Info.Turn = turn;
			Log(entity);
		}
开发者ID:clemgaut,项目名称:Hearthstone-Deck-Tracker,代码行数:5,代码来源:Player.cs

示例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;
		}
开发者ID:nakaneku,项目名称:Hearthstone-Deck-Tracker,代码行数:7,代码来源:Player.cs

示例15: DeckToPlay

		public void DeckToPlay(Entity entity, int turn)
		{
			UpdateKnownEntitesInDeck(entity.CardId);
			entity.Info.Turn = turn;
			Log(entity);
		}
开发者ID:clemgaut,项目名称:Hearthstone-Deck-Tracker,代码行数:6,代码来源:Player.cs


注:本文中的Hearthstone_Deck_Tracker.Hearthstone.Entities.Entity类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。