當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。