本文整理汇总了C#中Fighter.SetName方法的典型用法代码示例。如果您正苦于以下问题:C# Fighter.SetName方法的具体用法?C# Fighter.SetName怎么用?C# Fighter.SetName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fighter
的用法示例。
在下文中一共展示了Fighter.SetName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateCharacter
public Player CreateCharacter(string Class, UserInteraction ui)
{
Class = Class.ToLower();
Player newChar;
switch(Class)
{
case "barbarian":
newChar = new Barbarian(new int[] { 15, 15, 15, 10, 9, 10 });
newChar.SetArmor(Armors.chainShirt);
newChar.SetMainHand(new MasterworkWeapon(Weapons.battleaxe));
newChar.SetName("Bob");
break;
case "bard":
newChar = new Bard(new int[] { 15, 10, 15, 10, 9, 15 });
newChar.SetArmor(Armors.leatherArmor);
newChar.SetMainHand(new MasterworkWeapon(Weapons.rapier));
newChar.SetName("Bill");
break;
case "cleric":
newChar = new Cleric(new int[] { 15, 10, 15, 15, 9, 10 });
newChar.SetArmor(Armors.breastplate);
newChar.SetMainHand(new MasterworkWeapon(Weapons.heavyMace));
newChar.SetOffHand(Armors.heavyWoodenShield);
newChar.SetName("Chad");
break;
case "druid":
newChar = new Druid(new int[] { 15, 10, 15, 15, 9, 10 });
newChar.SetArmor(Armors.hideArmor);
newChar.SetMainHand(new MasterworkWeapon(Weapons.club));
newChar.SetOffHand(Armors.heavyWoodenShield);
newChar.SetName("Dave");
break;
case "fighter":
newChar = new Fighter(new int[] { 15, 15, 15, 10, 9, 10 });
newChar.SetArmor(Armors.breastplate);
newChar.SetMainHand(new MasterworkWeapon(Weapons.longsword));
newChar.SetOffHand(Armors.heavyWoodenShield);
newChar.SetName("Frank");
break;
case "monk":
newChar = new Monk(new int[] { 15, 10, 15, 10, 15, 9 });
newChar.SetMainHand(new MasterworkWeapon(Weapons.quarterstaff));
newChar.SetName("Molly");
break;
case "paladin":
newChar = new Paladin(new int[] { 15, 10, 15, 9, 15, 10 });
newChar.SetArmor(Armors.breastplate);
newChar.SetMainHand(new MasterworkWeapon(Weapons.longsword));
newChar.SetOffHand(Armors.heavyWoodenShield);
newChar.SetName("Phil");
break;
case "ranger":
newChar = new Ranger(new int[] { 15, 10, 15, 9, 15, 10 });
newChar.SetArmor(Armors.leatherArmor);
newChar.SetMainHand(new MasterworkWeapon(Weapons.longbow));
newChar.SetName("Randy");
break;
case "rogue":
newChar = new Rogue(new int[] { 15, 10, 15, 15, 9, 10 });
newChar.SetArmor(Armors.leatherArmor);
newChar.SetMainHand(new MasterworkWeapon(Weapons.rapier));
newChar.SetName("Rudy");
break;
case "sorcerer":
newChar = new Sorcerer(new int[] { 10, 15, 15, 10, 9, 15 });
newChar.SetMainHand(new MasterworkWeapon(Weapons.lightCrossbow));
newChar.SetName("Steve");
break;
case "wizard":
newChar = new Wizard(new int[] { 10, 15, 15, 15, 9, 10 });
newChar.SetMainHand(new MasterworkWeapon(Weapons.lightCrossbow));
newChar.SetName("Willis");
break;
default:
newChar = new Barbarian(new int[] { 10, 10, 10, 10, 10, 10 });
newChar.SetArmor(Armors.chainShirt);
newChar.SetMainHand(new MasterworkWeapon(Weapons.battleaxe));
newChar.SetName("Default");
break;
}
newChar.SetUI(ui);
newChar.AddItems(new Item[] { Consumables.minorHealthPotion, Consumables.minorHealthPotion, Consumables.minorManaPotion, Consumables.minorManaPotion, Consumables.minorHarmingPotion, Consumables.minorHarmingPotion });
return newChar;
}