本文整理汇总了C#中Monster.AddSkill方法的典型用法代码示例。如果您正苦于以下问题:C# Monster.AddSkill方法的具体用法?C# Monster.AddSkill怎么用?C# Monster.AddSkill使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Monster
的用法示例。
在下文中一共展示了Monster.AddSkill方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NewOrc
public static Character NewOrc( Vector3 location )
{
Monster orc = new Monster();
orc.Name = "Orc";
if (UnityEngine.Random.value > 0.5)
orc.MaleLayers.Add("TempSprites/Materials/ork");
else
orc.MaleLayers.Add("TempSprites/Materials/orc2");
orc.FemaleLayers = orc.MaleLayers;
SetStats(orc, 3, 1, 2,25);
orc.AddSkill(SkillFactory.FindSkillByName("Swords"), 1);
orc.AddSkill(SkillFactory.FindSkillByName("Tough"), 2);
orc.AddSkill(SkillFactory.FindSkillByName("Cleave"), 2);
orc.InventoryItems.GoldCoins = (int)UnityEngine.Random.Range(10,20);
orc.EquipItem(ItemFactory.FindItemByName("Sword") as Equipment, Equipment.EquipmentLocation.Weapon);
orc.EquipItem(ItemFactory.FindItemByName("Leather Armor") as Equipment, Equipment.EquipmentLocation.Torso);
orc.BackpackItem(ItemFactory.FindItemByName("Watermelon"));
orc.Smarts = new FightOrFlight();
return AttachToGame(orc, location,1.45f);
}
示例2: NewBandit
public static Character NewBandit(Vector3 location)
{
Monster mon = new Monster();
mon.Name = "Bandit";
if (UnityEngine.Random.value > 0.125)
mon.MaleLayers.Add("TempSprites/Materials/bandit");
else
{
mon.MaleLayers.Add("TempSprites/Materials/bandit_cheif");
mon.Name = "Fancy Bandit";
}
mon.FemaleLayers = mon.MaleLayers;
SetStats(mon, 2, 2, 2, 25);
mon.AddSkill(SkillFactory.FindSkillByName("Swords"), 3);
mon.InventoryItems.GoldCoins = (int)UnityEngine.Random.Range(20, 120);
mon.EquipItem(ItemFactory.FindItemByName("Sword") as Equipment, Equipment.EquipmentLocation.Weapon);
mon.EquipItem(ItemFactory.FindItemByName("Leather Armor") as Equipment, Equipment.EquipmentLocation.Torso);
mon.BackpackItem(ItemFactory.FindItemByName("Watermelon"));
mon.Smarts = new FightOrFlight(0.3f,0.5f);
return AttachToGame(mon, location,1.25f);
}
示例3: NewSkellymans
public static Character NewSkellymans(Vector3 location)
{
Monster mon = new Monster();
mon.Name = "Skellyman";
bool isFancy = UnityEngine.Random.value < 0.25;
if (!isFancy)
mon.MaleLayers.Add("TempSprites/Materials/skeleton");
else
{
mon.MaleLayers.Add("TempSprites/Materials/skeleton_chain");
mon.Name = "Dire " + mon.Name;
}
mon.FemaleLayers = mon.MaleLayers;
if (isFancy)
SetStats(mon, 2, 1, 1, 25);
else
SetStats(mon, 3, 0, 2, 50);
mon.AddSkill(SkillFactory.FindSkillByName("Swords"), isFancy ? 4 : 2);
mon.InventoryItems.GoldCoins = 0;
mon.EquipItem(ItemFactory.FindItemByName("Sword") as Equipment, Equipment.EquipmentLocation.Weapon);
mon.EquipItem(ItemFactory.FindItemByName( isFancy ? " Mail Armor" : "Leather Armor") as Equipment, Equipment.EquipmentLocation.Torso);
// mon.BackpackItem(ItemFactory.FindItemByName("Watermelon"));
mon.Smarts = new FightToDeath(0.75f);
return AttachToGame(mon, location,1.25f);
}