当前位置: 首页>>代码示例>>C#>>正文


C# Player.QuickSpawnItem方法代码示例

本文整理汇总了C#中Terraria.Player.QuickSpawnItem方法的典型用法代码示例。如果您正苦于以下问题:C# Player.QuickSpawnItem方法的具体用法?C# Player.QuickSpawnItem怎么用?C# Player.QuickSpawnItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Terraria.Player的用法示例。


在下文中一共展示了Player.QuickSpawnItem方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OpenBossBag

 public override void OpenBossBag(Player player)
 {
     int amountToDrop = Main.rand.Next(20,30);
     player.QuickSpawnItem(mod.ItemType("DarkGel"), amountToDrop);
     if (Main.rand.Next(2) == 0)
     {
         player.QuickSpawnItem(mod.ItemType("NightGelStabilizer"), 1);
     }
     if (Main.rand.Next(2) == 0)
     {
         player.QuickSpawnItem(mod.ItemType("NightSpiral"), 1);
     }
     if (Main.rand.Next(2) == 0)
     {
         player.QuickSpawnItem(mod.ItemType("DarkSlimeStaff"), 1);
     }
     if (Main.rand.Next(2) == 0)
     {
         player.QuickSpawnItem(mod.ItemType("PurpleDart"), 1);
     }
 }
开发者ID:ColinAV516,项目名称:EnergyMod,代码行数:21,代码来源:NightSlimeBag.cs

示例2: RightClick

 public override void RightClick(Player player)
 {
     player.QuickSpawnItem(ItemID.StardustHelmet);
     player.QuickSpawnItem(ItemID.StardustBreastplate);
     player.QuickSpawnItem(ItemID.StardustLeggings);
     player.QuickSpawnItem(ItemID.NecromanticScroll);
     player.QuickSpawnItem(ItemID.PapyrusScarab);
     base.RightClick(player);
 }
开发者ID:Eldrazi,项目名称:Gyrolite,代码行数:9,代码来源:GaseousRegenerativeMixture.cs

示例3: 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"));
 }
开发者ID:digitalseraphim,项目名称:tModLoader,代码行数:10,代码来源:AbominationBag.cs

示例4: OpenBossBag

        public override void OpenBossBag(Player player)
        {
            int amountToDrop = Main.rand.Next(20,30);
            player.QuickSpawnItem(mod.ItemType("ForestEnergy"), amountToDrop);
                player.QuickSpawnItem(mod.ItemType("TreeStaff"), 1);

                if (Main.rand.Next(4) == 0)
            {
                player.QuickSpawnItem(mod.ItemType("MegaTreeMask"), 1);
            }
        }
开发者ID:ColinAV516,项目名称:EnergyMod,代码行数:11,代码来源:MegaTreeBag.cs

示例5: OpenVanillaBag

		public override void OpenVanillaBag(string context, Player player, int arg)
		{
			if (context == "bossBag" && arg == ItemID.FishronBossBag)
			{
				player.QuickSpawnItem(mod.ItemType("Bubble"), Main.rand.Next(8, 13));
			}
		}
开发者ID:bluemagic123,项目名称:tModLoader,代码行数:7,代码来源:BossBags.cs

示例6: RightClick

 public override void RightClick(Player player)
 {
     player.QuickSpawnItem(ItemID.LifeCrystal, 15);
     player.QuickSpawnItem(ItemID.LifeFruit, 20);
     player.QuickSpawnItem(ItemID.ManaCrystal, 9);
     player.QuickSpawnItem(ItemID.AnkhShield);
     player.QuickSpawnItem(ItemID.FrostsparkBoots);
     player.QuickSpawnItem(ItemID.LavaWaders);
     player.QuickSpawnItem(ItemID.CellPhone);
     player.QuickSpawnItem(ItemID.SuspiciousLookingTentacle);
 }
开发者ID:digitalseraphim,项目名称:tModLoader,代码行数:11,代码来源:ExplorerBag.cs

示例7: 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"));
		}
开发者ID:DrakoGlyph,项目名称:tModLoader,代码行数:19,代码来源:PuritySpiritBag.cs

示例8: RightClick

 public override void RightClick(Player player)
 {
     player.QuickSpawnItem(mod.ItemType("FollowingMharadiumBullet"), 999);
     item.stack = 2;
 }
开发者ID:Eldrazi,项目名称:Mharadium,代码行数:5,代码来源:FollowingMharadiumBulletPouch.cs

示例9: RightClick

 public override void RightClick(Player player)
 {
     player.QuickSpawnItem(ItemID.LaserDrill);
 }
开发者ID:Eldrazi,项目名称:Mharadium,代码行数:4,代码来源:BulletPouch.cs

示例10: 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));
     }
 }
开发者ID:thegamingboffin,项目名称:Ulterraria_Reborn_GitHub,代码行数:34,代码来源:UlterrariaPlayers.cs


注:本文中的Terraria.Player.QuickSpawnItem方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。