• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Hearthstone.GameV2类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



GameV2类属于Hearthstone_Deck_Tracker.Hearthstone命名空间,在下文中一共展示了GameV2类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Start

		public async Task Start(GameV2 game)
		{
			if(game == null)
			{
				Log.Warn("Could not start timer, game is null");
				return;
			}
			Log.Info("Starting turn timer");
			if(_game != null)
			{
				Log.Warn("Turn timer is already running");
				return;
			}
			_game = game;
			PlayerSeconds = 0;
			OpponentSeconds = 0;
			Seconds = 75;
			if(game.PlayerEntity == null)
				Log.Warn("Waiting for player entity");
			while(game.PlayerEntity == null)
				await Task.Delay(100);
			if(game.OpponentEntity == null)
				Log.Warn("Waiting for player entity");
			while(game.OpponentEntity == null)
				await Task.Delay(100);
			TimerTick(new TimerState(Seconds, PlayerSeconds, OpponentSeconds));
			_timer.Start();
		}
开发者ID:ChuckJrster,项目名称:Hearthstone-Deck-Tracker,代码行数:28,代码来源:TurnTimer.cs


示例2: LoadConfig

		public void LoadConfig(GameV2 game)
		{
			_game = game;
			ComboboxGameMode.SelectedItem = Config.Instance.SelectedStatsFilterGameMode;
			ComboboxTime.SelectedValue = Config.Instance.SelectedStatsFilterTimeFrame;
			ComboboxUnassigned.SelectedValue = Config.Instance.StatsOverallFilterDeckMode;
			ComboBoxPlayerClass.SelectedValue = Config.Instance.StatsOverallFilterPlayerHeroClass;
			ComboBoxOpponentClassD.SelectedValue = Config.Instance.StatsFilterOpponentHeroClass;
			ComboBoxOpponentClassOG.SelectedValue = Config.Instance.StatsFilterOpponentHeroClass;
			CheckBoxApplyTagFiltersOS.IsChecked = Config.Instance.StatsOverallApplyTagFilters;
			CheckBoxApplyTagFiltersOG.IsChecked = Config.Instance.StatsOverallApplyTagFilters;
			_initialized = true;
			ExpandCollapseGroupBox(GroupboxDeckOverview, Config.Instance.StatsDeckOverviewIsExpanded);
			ExpandCollapseGroupBox(GroupboxClassOverview, Config.Instance.StatsClassOverviewIsExpanded);

			LoadOverallStats();

			DataGridGames.Items.SortDescriptions.Add(new SortDescription("StartTime", ListSortDirection.Descending));
			DataGridOverallGames.Items.SortDescriptions.Add(new SortDescription("StartTime", ListSortDirection.Descending));

			Core.MainWindow.FlyoutDeck.ClosingFinished += (sender, args) =>
			{
				BtnShowOpponentDeck.Content = BtnOpponentDeckTextShow;
				BtnOverallShowOpponentDeck.Content = BtnOpponentDeckTextShow;
			};
		}
开发者ID:joshuaduffy,项目名称:Hearthstone-Deck-Tracker,代码行数:26,代码来源:DeckStatsControl.xaml.cs


示例3: OverlayWindow

		public OverlayWindow(GameV2 game)
		{
			_game = game;
			InitializeComponent();

			if(Config.Instance.ExtraFeatures && Config.Instance.ForceMouseHook)
				HookMouse();
			ShowInTaskbar = Config.Instance.ShowInTaskbar;
			if(Config.Instance.VisibleOverlay)
				Background = (SolidColorBrush)new BrushConverter().ConvertFrom("#4C0000FF");
			_offsetX = Config.Instance.OffsetX;
			_offsetY = Config.Instance.OffsetY;
			_customWidth = Config.Instance.CustomWidth;
			_customHeight = Config.Instance.CustomHeight;
			if(Config.Instance.ShowBatteryLife)
				EnableBatteryMonitor();
			InitializeCollections();
			GridMain.Visibility = Hidden;
			if(User32.GetHearthstoneWindow() != IntPtr.Zero)
				UpdatePosition();
			Update(true);
			UpdateScaling();
			UpdatePlayerLayout();
			UpdateOpponentLayout();
			GridMain.Visibility = Visible;
		}
开发者ID:ChuckJrster,项目名称:Hearthstone-Deck-Tracker,代码行数:26,代码来源:OverlayWindow.xaml.cs


示例4: Start

		public static void Start(GameV2 game)
		{
			InitializeGameState(game);
			InitializeLogReaders();
			_startingPoint = GetStartingPoint();
			StartLogReaders();
		}
开发者ID:joshuaduffy,项目名称:Hearthstone-Deck-Tracker,代码行数:7,代码来源:LogReaderManager.cs


示例5: OpponentWindow

		public OpponentWindow(GameV2 game)
		{
			InitializeComponent();
		    _game = game;
			//ListViewOpponent.ItemsSource = opponentDeck;
			//opponentDeck.CollectionChanged += OpponentDeckOnCollectionChanged;
			Height = Config.Instance.OpponentWindowHeight;
			if(Config.Instance.OpponentWindowLeft.HasValue)
				Left = Config.Instance.OpponentWindowLeft.Value;
			if(Config.Instance.OpponentWindowTop.HasValue)
				Top = Config.Instance.OpponentWindowTop.Value;
			Topmost = Config.Instance.WindowsTopmost;

			var titleBarCorners = new[]
			{
				new Point((int)Left + 5, (int)Top + 5),
				new Point((int)(Left + Width) - 5, (int)Top + 5),
				new Point((int)Left + 5, (int)(Top + TitlebarHeight) - 5),
				new Point((int)(Left + Width) - 5, (int)(Top + TitlebarHeight) - 5)
			};
			if(!Screen.AllScreens.Any(s => titleBarCorners.Any(c => s.WorkingArea.Contains(c))))
			{
				Top = 100;
				Left = 100;
			}
			Update();
		}
开发者ID:JeromeDane,项目名称:Hearthstone-Deck-Tracker,代码行数:27,代码来源:OpponentWindow.xaml.cs


示例6: Load

		public void Load(GameV2 game)
		{
			_game = game;
			CheckboxHideOverlayInBackground.IsChecked = Config.Instance.HideInBackground;
			CheckboxHideOpponentCardAge.IsChecked = Config.Instance.HideOpponentCardAge;
			CheckboxHideOpponentCardMarks.IsChecked = Config.Instance.HideOpponentCardMarks;
			CheckboxHideOverlayInMenu.IsChecked = Config.Instance.HideInMenu;
			CheckboxHideOverlay.IsChecked = Config.Instance.HideOverlay;
			CheckboxHideDecksInOverlay.IsChecked = Config.Instance.HideDecksInOverlay;
			CheckboxHideSecrets.IsChecked = Config.Instance.HideSecrets;
			CheckboxOverlaySecretToolTipsOnly.IsChecked = Config.Instance.OverlaySecretToolTipsOnly;
			CheckboxHideOverlayInSpectator.IsChecked = Config.Instance.HideOverlayInSpectator;
			CheckboxOverlayCardMarkToolTips.IsChecked = Config.Instance.OverlayCardMarkToolTips;
			SliderOverlayOpacity.Value = Config.Instance.OverlayOpacity;
			CheckboxHideTimers.IsChecked = Config.Instance.HideTimers;
			CheckboxOverlayCardToolTips.IsChecked = Config.Instance.OverlayCardToolTips;
			CheckboxOverlayAdditionalCardToolTips.IsEnabled = Config.Instance.OverlayCardToolTips;
			CheckboxOverlayAdditionalCardToolTips.IsChecked = Config.Instance.AdditionalOverlayTooltips;
			CheckboxAutoGrayoutSecrets.IsChecked = Config.Instance.AutoGrayoutSecrets;
			CheckboxKeepDecksVisible.IsChecked = Config.Instance.KeepDecksVisible;
			CheckboxAlwaysShowGoldProgress.IsChecked = Config.Instance.AlwaysShowGoldProgress;
			CheckboxHidePlayerAttackIcon.IsChecked = Config.Instance.HidePlayerAttackIcon;
			CheckboxHideOpponentAttackIcon.IsChecked = Config.Instance.HideOpponentAttackIcon;
			CheckBoxBatteryStatus.IsChecked = Config.Instance.ShowBatteryLife;
			CheckBoxBatteryStatusText.IsChecked = Config.Instance.ShowBatteryLifePercent;
			CheckBoxFlavorText.IsChecked = Config.Instance.ShowFlavorText;
			_initialized = true;
		}
开发者ID:nakaneku,项目名称:Hearthstone-Deck-Tracker,代码行数:28,代码来源:OverlayGeneral.xaml.cs


示例7: AdjustedCount

		public int AdjustedCount(GameV2 game)
		{
			return (Config.Instance.AutoGrayoutSecrets
			        && (game.CurrentGameMode == GameMode.Casual || game.CurrentGameMode == GameMode.Ranked
			            || game.CurrentGameMode == GameMode.Friendly || game.CurrentGameMode == GameMode.Practice || ActiveDeckIsConstructed)
			        && game.Opponent.RevealedEntities.Count(x => x.Id < 68 && x.CardId == CardId) >= 2) ? 0 : Count;
		}
开发者ID:ChuckJrster,项目名称:Hearthstone-Deck-Tracker,代码行数:7,代码来源:Secret.cs


示例8: AdjustedCount

		public int AdjustedCount(GameV2 game)
		{
			return (Config.Instance.AutoGrayoutSecrets
			        && (game.CurrentGameMode == GameMode.Casual || game.CurrentGameMode == GameMode.Ranked
			            || game.CurrentGameMode == GameMode.Friendly || game.CurrentGameMode == GameMode.Practice)
			        && game.Opponent.RevealedCards.Where(x => x != null && x.Entity != null)
			               .Count(x => x.Entity.Id < 68 && x.Entity.CardId == CardId) >= 2) ? 0 : Count;
		}
开发者ID:nikolasferreira,项目名称:Hearthstone-Deck-Tracker,代码行数:8,代码来源:Secret.cs


示例9: AdjustedCount

	    public int AdjustedCount(GameV2 game)
	    {
            return (Config.Instance.AutoGrayoutSecrets
                        && (game.CurrentGameMode == GameMode.Casual
                            || game.CurrentGameMode == GameMode.Ranked || game.CurrentGameMode == GameMode.Brawl
                            || game.CurrentGameMode == GameMode.Friendly || game.CurrentGameMode == GameMode.Practice)
                        && game.OpponentCards.Any(x => !x.IsStolen && x.Id == CardId & x.Count >= 2)) ? 0 : Count;
        }
开发者ID:radoraykov,项目名称:Hearthstone-Deck-Tracker,代码行数:8,代码来源:Secret.cs


示例10: DebugWindow

		public DebugWindow(GameV2 game)
		{
		    _game = game;
		    InitializeComponent();
			_update = true;
			Closing += (sender, args) => _update = false;
			Update();
		}
开发者ID:radoraykov,项目名称:Hearthstone-Deck-Tracker,代码行数:8,代码来源:DebugWindow.xaml.cs


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


示例12: Start

 public void Start(IGameHandler gh, GameV2 game)
 {
     _gameState.AddToTurn = -1;
     _gameState.First = true;
     _gameState.DoUpdate = true;
     _gameState.GameHandler = gh;
     _gameState.GameEnded = false;
     ReadFileAsync();
 }
开发者ID:athemiz,项目名称:Hearthstone-Deck-Tracker,代码行数:9,代码来源:HsLogReaderV2.cs


示例13: Start

		public static async Task Start(GameV2 game)
		{
			if(!Helper.HearthstoneDirExists)
				await FindHearthstone();
			InitializeGameState(game);
			InitializeLogReaders();
			_startingPoint = GetStartingPoint();
			//StartLogReaders();
		}
开发者ID:clemgaut,项目名称:Hearthstone-Deck-Tracker,代码行数:9,代码来源:LogReaderManager.cs


示例14: LoadConfig

		public void LoadConfig(GameV2 game)
		{
			_game = game;
			CheckboxPlayerDraw.IsChecked = Config.Instance.GameDetails.ShowPlayerDraw;
			CheckboxOpponentDraw.IsChecked = Config.Instance.GameDetails.ShowOpponentDraw;
			CheckboxPlayerPlay.IsChecked = Config.Instance.GameDetails.ShowPlayerPlay;
			CheckboxOpponentPlay.IsChecked = Config.Instance.GameDetails.ShowOpponentPlay;
			CheckboxPlayerMulligan.IsChecked = Config.Instance.GameDetails.ShowPlayerMulligan;
			CheckboxOpponentMulligan.IsChecked = Config.Instance.GameDetails.ShowOpponentMulligan;
			_initialized = true;
		}
开发者ID:joshuaduffy,项目名称:Hearthstone-Deck-Tracker,代码行数:11,代码来源:GameDetails.xaml.cs


示例15: LoginWindow

		public LoginWindow()
		{
		    _game = new GameV2();
            Card.SetGame(_game);
		    InitializeComponent();
			Logger.Initialzie();
			Config.Load();
			if(HearthStatsAPI.LoadCredentials() || !Config.Instance.ShowLoginDialog)
				StartMainApp();
			CheckBoxRememberLogin.IsChecked = Config.Instance.RememberHearthStatsLogin;
			_initialized = true;
		}
开发者ID:Mattish,项目名称:Hearthstone-Deck-Tracker,代码行数:12,代码来源:LoginWindow.xaml.cs


示例16: Load

		public void Load(GameV2 game)
		{
			_game = game;
			CheckboxHighlightCardsInHand.IsChecked = Config.Instance.HighlightCardsInHand;
			CheckboxRemoveCards.IsChecked = Config.Instance.RemoveCardsFromDeck;
			CheckboxHighlightLastDrawn.IsChecked = Config.Instance.HighlightLastDrawn;
			CheckboxShowPlayerGet.IsChecked = Config.Instance.ShowPlayerGet;
			SliderPlayerOpacity.Value = Config.Instance.PlayerOpacity;
			SliderOverlayPlayerScaling.Value = Config.Instance.OverlayPlayerScaling;
			TextBoxScaling.Text = Config.Instance.OverlayPlayerScaling.ToString(CultureInfo.InvariantCulture);
			CheckboxSameScaling.IsChecked = Config.Instance.UseSameScaling;
			CheckBoxCenterDeckVertically.IsChecked = Config.Instance.OverlayCenterPlayerStackPanel;
			CheckBoxAttack.IsChecked = !Config.Instance.HidePlayerAttackIcon;
			ComboBoxCthun.ItemsSource = Enum.GetValues(typeof(DisplayMode)).Cast<DisplayMode>();
			ComboBoxCthun.SelectedItem = Config.Instance.PlayerCthunCounter;
			ComboBoxSpells.ItemsSource = Enum.GetValues(typeof(DisplayMode)).Cast<DisplayMode>();
			ComboBoxSpells.SelectedItem = Config.Instance.PlayerSpellsCounter;

			ElementSorterPlayer.IsPlayer = true;
			foreach(var itemName in Config.Instance.PanelOrderPlayer)
			{
				switch(itemName)
				{
					case "Deck Title":
						ElementSorterPlayer.AddItem(new ElementSorterItem("Deck Title", Config.Instance.ShowDeckTitle,
						                                                  value => Config.Instance.ShowDeckTitle = value, true));
						break;
					case "Cards":
						ElementSorterPlayer.AddItem(new ElementSorterItem("Cards", !Config.Instance.HidePlayerCards,
						                                                  value => Config.Instance.HidePlayerCards = !value, true));
						break;
					case "Card Counter":
						ElementSorterPlayer.AddItem(new ElementSorterItem("Card Counter", !Config.Instance.HidePlayerCardCount,
						                                                  value => Config.Instance.HidePlayerCardCount = !value, true));
						break;
					case "Fatigue Counter":
						ElementSorterPlayer.AddItem(new ElementSorterItem("Fatigue Counter", !Config.Instance.HidePlayerFatigueCount,
						                                                  value => Config.Instance.HidePlayerFatigueCount = !value, true));
						break;
					case "Draw Chances":
						ElementSorterPlayer.AddItem(new ElementSorterItem("Draw Chances", !Config.Instance.HideDrawChances,
						                                                  value => Config.Instance.HideDrawChances = !value, true));
						break;
					case "Wins":
						ElementSorterPlayer.AddItem(new ElementSorterItem("Wins", Config.Instance.ShowDeckWins,
						                                                  value => Config.Instance.ShowDeckWins = value, true));
						break;
				}
			}
			_initialized = true;
		}
开发者ID:ChuckJrster,项目名称:Hearthstone-Deck-Tracker,代码行数:51,代码来源:OverlayPlayer.xaml.cs


示例17: Load

		public void Load(GameV2 game)
		{
			_game = game;
			ComboboxArenaImportingBehaviour.ItemsSource = Enum.GetValues(typeof(ArenaImportingBehaviour));
			if(Config.Instance.SelectedArenaImportingBehaviour.HasValue)
				ComboboxArenaImportingBehaviour.SelectedItem = Config.Instance.SelectedArenaImportingBehaviour.Value;
			CheckboxTagOnImport.IsChecked = Config.Instance.TagDecksOnImport;
			CheckboxImportNetDeck.IsChecked = Config.Instance.NetDeckClipboardCheck ?? false;
			CheckboxAutoSaveOnImport.IsChecked = Config.Instance.AutoSaveOnImport;
			TextBoxArenaTemplate.Text = Config.Instance.ArenaDeckNameTemplate;
			CheckBoxConstructedImportNew.IsChecked = Config.Instance.ConstructedAutoImportNew;
			CheckBoxConstrucedUpdate.IsChecked = Config.Instance.ConstructedAutoUpdate;
			_initialized = true;
		}
开发者ID:clemgaut,项目名称:Hearthstone-Deck-Tracker,代码行数:14,代码来源:TrackerImporting.xaml.cs


示例18: LoginWindow

		public LoginWindow()
		{
			Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory);
			Logger.Initialzie();
			Config.Load();
			_game = new GameV2();
            Card.SetGame(_game);
			API.Core.Game = _game;
		    InitializeComponent();
			if(HearthStatsAPI.LoadCredentials() || !Config.Instance.ShowLoginDialog)
				StartMainApp();
			CheckBoxRememberLogin.IsChecked = Config.Instance.RememberHearthStatsLogin;
			_initialized = true;
		}
开发者ID:radoraykov,项目名称:Hearthstone-Deck-Tracker,代码行数:14,代码来源:LoginWindow.xaml.cs


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


示例20: Load

	    public void Load(GameV2 game)
		{
            _game = game;
            CheckboxHighlightCardsInHand.IsChecked = Config.Instance.HighlightCardsInHand;
			CheckboxRemoveCards.IsChecked = Config.Instance.RemoveCardsFromDeck;
			CheckboxHighlightLastDrawn.IsChecked = Config.Instance.HighlightLastDrawn;
			CheckboxShowPlayerGet.IsChecked = Config.Instance.ShowPlayerGet;
			SliderPlayerOpacity.Value = Config.Instance.PlayerOpacity;
			SliderOverlayPlayerScaling.Value = Config.Instance.OverlayPlayerScaling;
			TextBoxScaling.Text = Config.Instance.OverlayPlayerScaling.ToString(CultureInfo.InvariantCulture);
			CheckboxSameScaling.IsChecked = Config.Instance.UseSameScaling;

			ElementSorterPlayer.IsPlayer = true;
			foreach(var itemName in Config.Instance.PanelOrderPlayer)
			{
				switch(itemName)
				{
					case "Deck Title":
						ElementSorterPlayer.AddItem(new ElementSorterItem("Deck Title", Config.Instance.ShowDeckTitle,
						                                                  value => Config.Instance.ShowDeckTitle = value, true));
						break;
					case "Cards":
						ElementSorterPlayer.AddItem(new ElementSorterItem("Cards", !Config.Instance.HidePlayerCards,
						                                                  value => Config.Instance.HidePlayerCards = !value, true));
						break;
					case "Card Counter":
						ElementSorterPlayer.AddItem(new ElementSorterItem("Card Counter", !Config.Instance.HidePlayerCardCount,
						                                                  value => Config.Instance.HidePlayerCardCount = !value, true));
						break;
					case "Fatigue Counter":
						ElementSorterPlayer.AddItem(new ElementSorterItem("Fatigue Counter", !Config.Instance.HidePlayerFatigueCount,
						                                                  value => Config.Instance.HidePlayerFatigueCount = !value, true));
						break;
					case "Draw Chances":
						ElementSorterPlayer.AddItem(new ElementSorterItem("Draw Chances", !Config.Instance.HideDrawChances,
						                                                  value => Config.Instance.HideDrawChances = !value, true));
						break;
					case "Wins":
						ElementSorterPlayer.AddItem(new ElementSorterItem("Wins", Config.Instance.ShowDeckWins,
						                                                  value => Config.Instance.ShowDeckWins = value, true));
						break;
				}
			}
			Helper.MainWindow.Overlay.UpdatePlayerLayout();
			Helper.MainWindow.PlayerWindow.UpdatePlayerLayout();
			_initialized = true;
		}
开发者ID:nikolasferreira,项目名称:Hearthstone-Deck-Tracker,代码行数:47,代码来源:OverlayPlayer.xaml.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Entities.Entity类代码示例发布时间:2022-05-26
下一篇:
C# Hearthstone.Deck类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap