public static void AmmoItem(Transform target, float amount) { AmmunitionManager am = target.GetComponent <AmmunitionManager>(); am.GetAmmo(amount); }