本文整理汇总了C#中Terraria.Player.TryGettingDevArmor方法的典型用法代码示例。如果您正苦于以下问题:C# Player.TryGettingDevArmor方法的具体用法?C# Player.TryGettingDevArmor怎么用?C# Player.TryGettingDevArmor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Terraria.Player
的用法示例。
在下文中一共展示了Player.TryGettingDevArmor方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OpenBossBag
public override void OpenBossBag(Player player)
{
player.TryGettingDevArmor();
player.TryGettingDevArmor();
int choice = Main.rand.Next(7);
if (choice == 0)
{
player.QuickSpawnItem(mod.ItemType("PuritySpiritMask"));
}
else if (choice == 1)
{
player.QuickSpawnItem(mod.ItemType("BunnyMask"));
}
if (choice != 1)
{
player.QuickSpawnItem(ItemID.Bunny);
}
player.QuickSpawnItem(mod.ItemType("PurityShield"));
}
示例2: OpenBossBag
public override void OpenBossBag(Player player)
{
player.TryGettingDevArmor();
if(Main.rand.Next(7) == 0)
{
player.QuickSpawnItem(mod.ItemType("AbominationMask"));
}
player.QuickSpawnItem(mod.ItemType("MoltenDrill"));
player.QuickSpawnItem(mod.ItemType("SixColorShield"));
}
示例3: OpenBossBags
public static void OpenBossBags(Player p, int type)
{
if (type == 3617)
{
int amount = Main.rand.Next(3, 7);
p.QuickSpawnItem(58, amount);
if (Main.rand.Next(6) == 0)
{
p.QuickSpawnItem(3715, 1);
}
if (Main.rand.Next(2) == 0)
{
p.QuickSpawnItem(3753, 1);
}
p.QuickSpawnItem(3618, 1);
}
if (type == 3758)
{
p.TryGettingDevArmor();
int amount = Main.rand.Next(3, 7);
p.QuickSpawnItem(58, amount);
if (Main.rand.Next(6) == 0)
{
p.QuickSpawnItem(3716, 1);
}
p.QuickSpawnItem(3665, 1);
if (Main.rand.Next(2) == 0)
{
p.QuickSpawnItem(3754, 1);
}
p.QuickSpawnItem(3720, Main.rand.Next(25, 41));
p.QuickSpawnItem(1225, Main.rand.Next(15, 31));
}
}