本文整理汇总了C#中CardType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# CardType.ToString方法的具体用法?C# CardType.ToString怎么用?C# CardType.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CardType
的用法示例。
在下文中一共展示了CardType.ToString方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Member
public Member Member(string usernameOrId, CardType cardType = CardType.None)
{
var request = new RestRequest("/1/members/{username}", Method.GET);
request.AddUrlSegment("username", usernameOrId);
request.AddParameter("cards", cardType.ToString().ToLower());
var member = ServiceManager.Execute<Member>(request);
return member;
}
示例2: ToString
public static string ToString(CardType type, CardSuit suit)
{
int t = (int)type;
if (t < 10)
return t.ToString() + suit.ToString();
else
return type.ToString() + suit.ToString();
}
示例3: CardTypeConverter
public static string CardTypeConverter(CardType type) => type == CardType.HERO_POWER ? "Hero Power" : CultureInfo.InvariantCulture.TextInfo.ToTitleCase(type.ToString().ToLowerInvariant().Replace("_", ""));
示例4: VillageRandomizer
protected VillageRandomizer(CardType type, string name, params string[] additionalTags)
: base(type, name, new[] { type.ToString() }.Concat(additionalTags).ToArray())
{
}
示例5: SetType
public void SetType(CardType cardType)
{
this.type = cardType;
this.name = type.ToString();
this.title = type.ToString();
if (this.title == "PERSEPHONE") this.title = "PERSEPH";
switch(type) {
/*
case CardType.HERA:
this.strength = -1;
this.special = true;
break;
case CardType.IO:
this.strength = 0;
this.special = true;
break;
case CardType.AMAZON:
this.strength = 2;
this.special = true;
break;
case CardType.NEMESIS:
this.strength = 7;
this.special = false;
break;
case CardType.ARTEMIS:
this.strength = 6;
this.special = false;
break;
case CardType.HYDRA:
this.strength = 5;
this.special = false;
break;
case CardType.HARPY:
this.strength = 4;
this.special = false;
break;
case CardType.FURY:
this.strength = 3;
this.special = false;
break;
*/
case CardType.ZEUS:
this.strength = -1;
this.special = true;
break;
case CardType.ARGUS:
this.strength = 0;
this.special = true;
break;
case CardType.HERO:
this.strength = 2;
this.special = true;
break;
case CardType.POSEIDON:
this.strength = 7;
this.special = false;
break;
case CardType.APOLLO:
this.strength = 6;
this.special = false;
break;
case CardType.GIANT:
this.strength = 5;
this.special = false;
break;
case CardType.CYCLOPS:
this.strength = 4;
this.special = false;
break;
case CardType.CENTAUR:
this.strength = 3;
this.special = false;
break;
case CardType.DIONYSUS:
this.strength = -1;
this.special = true;
break;
case CardType.HADES:
this.strength = -1;
this.special = true;
break;
case CardType.MEDUSA:
this.strength = 0;
this.special = true;
break;
case CardType.PANDORA:
this.strength = 0;
this.special = true;
break;
case CardType.PEGASUS:
this.strength = 1;
this.special = true;
break;
case CardType.PERSEPHONE:
this.strength = -1;
this.special = true;
break;
case CardType.PYTHIA:
this.strength = 0;
//.........这里部分代码省略.........
示例6: CardTypeConverter
public static string CardTypeConverter(CardType type)
{
return CultureInfo.InvariantCulture.TextInfo.ToTitleCase(type.ToString().ToLower().Replace("_", ""));
}
示例7: CardTypeConverter
public static string CardTypeConverter(CardType type)
{
if(type == CardType.HERO_POWER)
return "Hero Power";
return CultureInfo.InvariantCulture.TextInfo.ToTitleCase(type.ToString().ToLower().Replace("_", ""));
}