本文整理汇总了C#中Hero.AddWeapon方法的典型用法代码示例。如果您正苦于以下问题:C# Hero.AddWeapon方法的具体用法?C# Hero.AddWeapon怎么用?C# Hero.AddWeapon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Hero
的用法示例。
在下文中一共展示了Hero.AddWeapon方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateHero
// CHARACTER CREATION:
// Create the Hero data class that will hold all the information of the player's Hero character
public void CreateHero(string name = "Hiro", string weaponOne = "Kinetic Rifle", string weaponTwo = "Freeze Gun", string tool = "Mining Drill", string armor = "Vacumn Suit", float maxHP = 100f, float curHP = 100f, float attk = 2, NanoBuilder builder = null)
{
// Default constructor for test needs a weapon, a tool, and armor.
theHero = new Hero(name,
Items_Database.Instance.GetWeaponfromID(weaponOne),
Items_Database.Instance.GetArmorfromID(armor),
Items_Database.Instance.GetToolfromID(tool),
maxHP,
curHP,
attk,
builder);
theHero.AddWeapon(Items_Database.Instance.GetWeaponfromID(weaponTwo));
// Debug.Log("Hero Created!");
// Debug.Log("Hero is wielding: " + theHero.weapons[0].itemName + " armor: " + theHero.armor.itemName + " and tool: " + theHero.tools[0].itemName);
// Debug.Log("and " + theHero.weapons[1].itemName);
isHeroCreated = true;
}