//Gonna make this a hell of a lot more complex, boy howdee public void GiveGun(GameObject gunPrefab, Collectable gunInfo) { //Check to see if player has the gun if (inventory.CompareGun((GunInfo)gunInfo)) { //Else, give reserve ammo for player //TODO: give player ammo reserves Debug.Log("Ammo should be added to reserves"); } else { //TODO: if gun isnt the same, overwrite the current one with the new one //if they dont, instantiate and give them it GameObject newGun = Instantiate(gunPrefab, gunHolder.transform.position, Quaternion.identity, gunHolder.transform) as GameObject; inventory.SetEquippedGun(newGun, (GunInfo)gunInfo); } }