AmmoUsage.SwitchAmmoType
Declaration#
public void SwitchAmmoType(string ammoItemId, bool returnOldToInventory, bool loadNow)Parameters#
| Name | Description |
|---|---|
| ammoItemId | New type of ammo to use |
| returnOldToInventory | Return any old ammo to the inventory |
| loadNow | Load the new ammo now |
Description#
Set the type of ammo to use when firing.
Usage#
Example
using NullSave.GDTK.Inventory;using UnityEngine;
public class Example : MonoBehaviour{ public void ExampleMethod(GDTKItem item, string newAmmoId) { AmmoUsage plugin = item.GetPlugin<AmmoUsage>(); plugin.SwitchAmmoType(newAmmoId, true, true); }}