本文整理匯總了C#中Card.GetCardName方法的典型用法代碼示例。如果您正苦於以下問題:C# Card.GetCardName方法的具體用法?C# Card.GetCardName怎麽用?C# Card.GetCardName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Card
的用法示例。
在下文中一共展示了Card.GetCardName方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: ShowCardInfo
/// <summary>
/// 根據腳本顯示出卡片信息
/// </summary>
private void ShowCardInfo(Card card)
{
this.CardName.text = card.GetCardName();
this.CardType.text = CardTypes.GetCardTypeNames(card.GetCardType());
this.CardRarity.text = CardRaritys.GetCardRarityNames(card.GetCardRarity());
this.CardOwner.text = card.GetCardOwner();
this.CardDes.text = card.GetCardDescription();
}
示例2: AddState
/// <summary>
/// 添加卡片狀態
/// </summary>
public void AddState(StateSkill state, Card from)
{
state.SetOwnerCard(this);//設置狀態的擁有者
this.cardState.Add(state, from);//狀態,來源
LogsSystem.Instance.Print(
string.Format("角色 {0} 獲得狀態 {1} ,持續 {2} 回合(來自:{3})", CardNames.Instance.GetCardName(this.cardName), SkillNames.Instance.GetSkillName(state.GetSkillCommonName()), state.GetLastRound(), from.GetCardName())
);
}
示例3: AddCardGroup
/// <summary>
/// 成組添加卡片
/// 一組六個
/// </summary>
public void AddCardGroup(Card beginCard)
{
int beginid = beginCard.GetCardID();
for (int i = 1; i <= 6; i++)
{
//通用成員屬性
int cardId = beginid + i - 1;
string cardName = beginCard.GetCardName();
CardRarity cardRarity = (CardRarity)i;
string cardDescription = beginCard.GetCardDescription();
if (beginCard is CharacterCard)//如果是角色卡
{
//角色卡成組通用參數
CharacterCard beginCharacterCard = beginCard as CharacterCard;
AddCard(new CharacterCard(cardId, cardName, cardRarity, cardDescription));
}
else if (beginCard is ItemCard)
{
AddCard(new ItemCard(cardId, cardName, cardRarity, cardDescription));
//AddCard(new Card(beginid + i - 1, beginCard.GetCardName(), beginCard.GetCardType(), beginCard.GetCardSkillList(), (CardRarity)i, beginCard.GetCardDescription()));
}
}
}