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


C# Hearthstone.Card类代码示例

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


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

示例1: CardInCollection

 public CardInCollection(Card card, int amountNonGolden = 0, int amountGolden = 0)
 {
     Card = card;
     AmountNonGolden = amountNonGolden;
     AmountGolden = amountGolden;
     DesiredAmount = MaxAmountInCollection;
 }
开发者ID:cbartol,项目名称:Hearthstone-Collection-Tracker,代码行数:7,代码来源:CardInCollection.cs

示例2: Game

		static Game()
		{
			Entities = new Dictionary<int, Entity>();
			CurrentGameMode = GameMode.None;
			IsInMenu = true;
			SetAsideCards = new List<string>();
			OpponentReturnedToDeck = new List<KeyValuePair<string, int>>();
			PlayerDeck = new ObservableCollection<Card>();
			PlayerDrawn = new ObservableCollection<Card>();
			OpponentCards = new ObservableCollection<Card>();
			PossibleArenaCards = new List<Card>();
			PossibleConstructedCards = new List<Card>();
			_cardDb = new Dictionary<string, Card>();
			OpponentHandAge = new int[MaxHandSize];
			OpponentHandMarks = new CardMark[MaxHandSize];
			OpponentStolenCardsInformation = new Card[MaxHandSize];
			OpponentSecrets = new OpponentSecrets();
			for(var i = 0; i < MaxHandSize; i++)
			{
				OpponentHandAge[i] = -1;
				OpponentHandMarks[i] = CardMark.None;
			}

			LoadCardDb(Helper.LanguageDict.ContainsValue(Config.Instance.SelectedLanguage) ? Config.Instance.SelectedLanguage : "enUS");
		}
开发者ID:radoraykov,项目名称:Hearthstone-Deck-Tracker,代码行数:25,代码来源:Game.cs

示例3: GameV2

		public GameV2()
		{
            Entities = new Dictionary<int, Entity>();
			CurrentGameMode = GameMode.None;
			IsInMenu = true;
			SetAsideCards = new List<string>();
			OpponentReturnedToDeck = new List<KeyValuePair<string, int>>();
			PlayerDeck = new ObservableCollection<Card>();
			PlayerDrawn = new ObservableCollection<Card>();
			PlayerDrawnIdsTotal = new ObservableCollection<string>();
			OpponentCards = new ObservableCollection<Card>();
			PossibleArenaCards = new List<Card>();
			PossibleConstructedCards = new List<Card>();
			OpponentHandAge = new int[MaxHandSize];
			OpponentHandMarks = new CardMark[MaxHandSize];
			OpponentStolenCardsInformation = new Card[MaxHandSize];
			OpponentSecrets = new OpponentSecrets();
			for(var i = 0; i < MaxHandSize; i++)
			{
				OpponentHandAge[i] = -1;
				OpponentHandMarks[i] = CardMark.None;
			}

			
		}
开发者ID:ParagonRice,项目名称:Hearthstone-Deck-Tracker,代码行数:25,代码来源:GameV2.cs

示例4: GetSearchString

		public static string GetSearchString(Card card)
		{
			var searchString = card.LocalizedName.ToLowerInvariant();
			if(AddArtist)
				searchString += " " + card.Artist.ToLowerInvariant();
			searchString += GetSpecialSearchCases(card.Name);
			return searchString;
		}
开发者ID:natorius,项目名称:Hearthstone-Deck-Tracker,代码行数:8,代码来源:ExportingHelper.cs

示例5: CardStats

 public CardStats(string id)
 {
     card = Database.GetCardFromId(id);
     drawn = 0;
     played = 0;
     won = 0;
     loss = 0;
 }
开发者ID:kgpasta,项目名称:HearthstoneCardStats,代码行数:8,代码来源:CardStats.cs

示例6: CardObject

		public CardObject(Card card)
		{
			if(card != null)
			{
				id = card.Id;
				count = card.Count.ToString();
			}
		}
开发者ID:christopher7694,项目名称:Hearthstone-Deck-Tracker,代码行数:8,代码来源:CardObject.cs

示例7: GetBattleCryFor

        // todo make choose random not just first;
        public SoundPlaySetting GetBattleCryFor(Card card, CardSource cardSource)
        {
            var soundPlaySetting = _configManager.Config.SoundFiles.FirstOrDefault((sound) =>
            {
                return (sound.CardSource == CardSource.All || cardSource == sound.CardSource) && sound.CardId == card.Id;
            });

            return soundPlaySetting;
        }
开发者ID:falconmick,项目名称:BattleCryPluggin,代码行数:10,代码来源:ConfigCardSoundPicker.cs

示例8: CardBarImageBuilder

		protected CardBarImageBuilder(Card card, string dir)
		{
			Card = card;
			ThemeDir = dir;
			TextTypeFace = Helper.LatinLanguages.Contains(Config.Instance.SelectedLanguage)
							   ? NumbersTypeFace : new Typeface(new FontFamily(), FontStyles.Normal, FontWeights.Bold, FontStretches.Condensed);
			HasAllRequired = Required.All(x => File.Exists(Path.Combine(ThemeDir, x.Value.FileName)));
			HasAllOptionalFrames = OptionalFrame.All(x => File.Exists(Path.Combine(ThemeDir, x.Value.FileName)));
			HasAllOptionalGems = OptionalGems.All(x => File.Exists(Path.Combine(ThemeDir, x.Value.FileName)));
			HasAllOptionalCountBoxes = OptionalCountBoxes.All(x => File.Exists(Path.Combine(ThemeDir, x.Value.FileName)));
		}
开发者ID:ChuckJrster,项目名称:Hearthstone-Deck-Tracker,代码行数:11,代码来源:CardBarImageBuilder.cs

示例9: OnPlay

        private void OnPlay(Card card, CardSource cardSource)
        {
            var soundToPlay = _cardSoundPicker.GetBattleCryFor(card, cardSource);
            if(soundToPlay == null)
            {
                Hearthstone_Deck_Tracker.Logger.WriteLine("BattleCry SFX not found");
                return;
            }

            _soundBoard.Play(soundToPlay);
            Hearthstone_Deck_Tracker.Logger.WriteLine("BattleCry Sound Effect Triggered");
        }
开发者ID:falconmick,项目名称:BattleCryPluggin,代码行数:12,代码来源:PlayHandler.cs

示例10: CardImageBuilder

		public CardImageBuilder(Card card)
		{
			_card = card;
		}
开发者ID:Rob2K2,项目名称:Hearthstone-Deck-Tracker,代码行数:4,代码来源:CardImageBuilder.cs

示例11: IsActualCard

		// TODO: possibly refactor with GetActualCards, reduce duplication
		public static bool IsActualCard(Card card)
		{
			if(card == null)
				return false;
			return (card.Type == "Minion" || card.Type == "Spell" || card.Type == "Weapon")
			       && (Helper.IsNumeric(card.Id.ElementAt(card.Id.Length - 1)) || card.Id == "AT_063t")
			       && Helper.IsNumeric(card.Id.ElementAt(card.Id.Length - 2))
			       && !CardIds.InvalidCardIds.Any(id => card.Id.Contains(id));
		}
开发者ID:radoraykov,项目名称:Hearthstone-Deck-Tracker,代码行数:10,代码来源:Game.cs

示例12: IsActualCard

		public static bool IsActualCard(Card card) => Database.IsActualCard(card);
开发者ID:ChuckJrster,项目名称:Hearthstone-Deck-Tracker,代码行数:1,代码来源:GameV2.cs

示例13: Clone

		public object Clone()
		{
			var newcard = new Card(Id, PlayerClass, Rarity, Type, Name, Cost, LocalizedName, InHandCount, Count, Text, Attack, Health,
			                       Race, Mechanics, Durability);
			return newcard;
		}
开发者ID:JulioCL,项目名称:Hearthstone-Deck-Tracker,代码行数:6,代码来源:Card.cs

示例14: EqualsWithCount

		public bool EqualsWithCount(Card card)
		{
			return card.Id == Id && card.Count == Count;
		}
开发者ID:radoraykov,项目名称:Hearthstone-Deck-Tracker,代码行数:4,代码来源:Card.cs

示例15: AddCardToDeck

		///<summary>
		/// Returns -1 if Hearthstone loses focus
		/// </summary>
		public static async Task<int> AddCardToDeck(Card card, ExportingInfo info)
		{
			if(!User32.IsHearthstoneInForeground())
			{
				Core.MainWindow.ShowMessage("Exporting aborted", "Hearthstone window lost focus.").Forget();
				Logger.WriteLine("Exporting aborted, window lost focus", "DeckExporter");
				return -1;
			}

			if(Config.Instance.ExportForceClear)
				await ClearSearchBox(info.HsHandle, info.SearchBoxPos);

			await ClickOnPoint(info.HsHandle, info.SearchBoxPos);

			if(Config.Instance.ExportPasteClipboard)
			{
				Clipboard.SetText(GetSearchString(card));
				SendKeys.SendWait("^v");
			}
			else
				SendKeys.SendWait(GetSearchString(card));
			SendKeys.SendWait("{ENTER}");

			Logger.WriteLine("try to export card: " + card, "DeckExporter");
			await Task.Delay(Config.Instance.DeckExportDelay * 2);

			if(await CheckForSpecialCases(card, info.CardPosX + 50, info.Card2PosX + 50, info.CardPosY + 50, info.HsHandle))
				return 0;

			//Check if Card exist in collection
			if(CardExists(info.HsHandle, (int)info.CardPosX, (int)info.CardPosY, info.HsRect.Width, info.HsRect.Height))
			{
				//Check if a golden exist
				if(Config.Instance.PrioritizeGolden
				   && CardExists(info.HsHandle, (int)info.Card2PosX, (int)info.CardPosY, info.HsRect.Width, info.HsRect.Height))
				{
					await ClickOnPoint(info.HsHandle, new Point((int)info.Card2PosX + 50, (int)info.CardPosY + 50));

					if(card.Count == 2)
					{
						await ClickOnPoint(info.HsHandle, new Point((int)info.Card2PosX + 50, (int)info.CardPosY + 50));
						await ClickOnPoint(info.HsHandle, new Point((int)info.CardPosX + 50, (int)info.CardPosY + 50));
					}
				}
				else
				{
					await ClickOnPoint(info.HsHandle, new Point((int)info.CardPosX + 50, (int)info.CardPosY + 50));

					if(card.Count == 2)
					{
						//Check if two card are not available 
						await Task.Delay(200 - Config.Instance.DeckExportDelay);
						if(CardHasLock(info.HsHandle, (int)(info.CardPosX + info.HsRect.Width * 0.048),
						                               (int)(info.CardPosY + info.HsRect.Height * 0.287), info.HsRect.Width, info.HsRect.Height))
						{
							if(CardExists(info.HsHandle, (int)info.Card2PosX, (int)info.CardPosY, info.HsRect.Width, info.HsRect.Height))
							{
								await ClickOnPoint(info.HsHandle, new Point((int)info.Card2PosX + 50, (int)info.CardPosY + 50));
								return 0;
							}
							Logger.WriteLine("Only one copy found: " + card.Name, "DeckExporter");
							return 1;
						}

						await ClickOnPoint(info.HsHandle, new Point((int)info.CardPosX + 50, (int)info.CardPosY + 50));
					}
				}
			}
			else
				return card.Count;
			return 0;
		}
开发者ID:aczzdx,项目名称:Hearthstone-Deck-Tracker,代码行数:75,代码来源:ExportingActions.cs


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