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


C# Entity.SetTag方法代码示例

本文整理汇总了C#中Hearthstone_Deck_Tracker.Hearthstone.Entities.Entity.SetTag方法的典型用法代码示例。如果您正苦于以下问题:C# Entity.SetTag方法的具体用法?C# Entity.SetTag怎么用?C# Entity.SetTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Hearthstone_Deck_Tracker.Hearthstone.Entities.Entity的用法示例。


在下文中一共展示了Entity.SetTag方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: Setup

        public void Setup()
		{
			Core.Game = null;
			_game = new GameV2();
	        Core.Game = _game;
            _gameEventHandler = new GameEventHandler(_game);

            _heroPlayer = CreateNewEntity("HERO_01");
            _heroPlayer.SetTag(GameTag.CARDTYPE, (int)CardType.HERO);
            _heroPlayer.IsPlayer = true;
            _heroOpponent = CreateNewEntity("HERO_02");
            _heroOpponent.SetTag(GameTag.CARDTYPE, (int) CardType.HERO);
            _heroOpponent.SetTag(GameTag.CONTROLLER, _heroOpponent.Id);
            _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(GameTag.CARDTYPE, (int)CardType.MINION);
            _playerMinion1.SetTag(GameTag.CONTROLLER, _heroPlayer.Id);
            _opponentMinion1 = CreateNewEntity("EX1_020");
            _opponentMinion1.SetTag(GameTag.CARDTYPE, (int)CardType.MINION);
            _opponentMinion1.SetTag(GameTag.CONTROLLER, _heroOpponent.Id);
            _opponentMinion2 = CreateNewEntity("EX1_021");
            _opponentMinion2.SetTag(GameTag.CARDTYPE, (int)CardType.MINION);
            _opponentMinion2.SetTag(GameTag.CONTROLLER, _heroOpponent.Id);
            _playerSpell1 = CreateNewEntity("CS2_029");
            _playerSpell1.SetTag(GameTag.CARDTYPE, (int)CardType.SPELL);
            _playerSpell1.SetTag(GameTag.CARD_TARGET, _opponentMinion1.Id);
            _playerSpell1.SetTag(GameTag.CONTROLLER, _heroPlayer.Id);
            _playerSpell2 = CreateNewEntity("CS2_025");
            _playerSpell2.SetTag(GameTag.CARDTYPE, (int)CardType.SPELL);
            _playerSpell2.SetTag(GameTag.CONTROLLER, _heroPlayer.Id);

            _game.Entities.Add(2, _playerMinion1);
            _game.Entities.Add(3, _opponentMinion1);
            _game.Entities.Add(4, _opponentMinion2);

            _secretHunter1 = CreateNewEntity("");
            _secretHunter1.SetTag(GameTag.CLASS, (int)CardClass.HUNTER);
            _secretHunter2 = CreateNewEntity("");
            _secretHunter2.SetTag(GameTag.CLASS, (int)CardClass.HUNTER);
            _secretMage1 = CreateNewEntity("");
            _secretMage1.SetTag(GameTag.CLASS, (int)CardClass.MAGE);
            _secretMage2 = CreateNewEntity("");
            _secretMage2.SetTag(GameTag.CLASS, (int)CardClass.MAGE);
            _secretPaladin1 = CreateNewEntity("");
            _secretPaladin1.SetTag(GameTag.CLASS, (int)CardClass.PALADIN);
            _secretPaladin2 = CreateNewEntity("");
            _secretPaladin2.SetTag(GameTag.CLASS, (int)CardClass.PALADIN);

            _gameEventHandler.HandleOpponentSecretPlayed(_secretHunter1, "", 0, 0, Zone.HAND, _secretHunter1.Id);
            _gameEventHandler.HandleOpponentSecretPlayed(_secretMage1, "", 0, 0, Zone.HAND, _secretMage1.Id);
            _gameEventHandler.HandleOpponentSecretPlayed(_secretPaladin1, "", 0, 0, Zone.HAND, _secretPaladin1.Id);
        }
开发者ID:chenhaifemg,项目名称:Hearthstone-Deck-Tracker,代码行数:58,代码来源:SecretTests.cs

示例3: 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.SetTag(GAME_TAG.CONTROLLER, _heroOpponent.Id);
            _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:Rob2K2,项目名称:Hearthstone-Deck-Tracker,代码行数:49,代码来源:SecretTests.cs

示例4: 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

示例5: Setup

		public void Setup()
		{
			_entities = new Dictionary<int, Entity>();
			_entities[0] = new Entity(0);
			_entities[0].SetTag(GAME_TAG.FIRST_PLAYER, 1);
			_entities[0].IsPlayer = true;
			_entities[1] = new Entity(1);
			_entities[1].Name = "GameEntity";
			_entities[1].SetTag(GAME_TAG.TURN, 11);

			_heroA = new Entity(4);
			_heroA.CardId = "HERO_08";
			_heroA.Name = null;
			_heroA.IsPlayer = false;
			_heroA.SetTag(GAME_TAG.HEALTH, 30);
			_heroA.SetTag(GAME_TAG.ZONE, 1);
			_heroA.SetTag(GAME_TAG.CONTROLLER, 1);
			_heroA.SetTag(GAME_TAG.ENTITY_ID, 4);
			_heroA.SetTag(GAME_TAG.CARDTYPE, 3);
			_heroA.SetTag(GAME_TAG.DAMAGE, 7);
			_heroA.SetTag(GAME_TAG.ARMOR, 0);

			_heroB = new Entity(36);
			_heroB.CardId = "HERO_03";
			_heroB.Name = null;
			_heroB.IsPlayer = false;
			_heroB.SetTag(GAME_TAG.HEALTH, 30);
			_heroB.SetTag(GAME_TAG.ZONE, 1);
			_heroB.SetTag(GAME_TAG.CONTROLLER, 2);
			_heroB.SetTag(GAME_TAG.ENTITY_ID, 36);
			_heroB.SetTag(GAME_TAG.CARDTYPE, 3);
			_heroB.SetTag(GAME_TAG.DAMAGE, 14);
			_heroB.SetTag(GAME_TAG.ARMOR, 0);
			_heroB.SetTag(GAME_TAG.ATK, 1);
			_heroB.SetTag(GAME_TAG.EXHAUSTED, 1);
		}
开发者ID:natorius,项目名称:Hearthstone-Deck-Tracker,代码行数:36,代码来源:EntityHelperTest.cs


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