void SpawnWeapon(GameObject obj) { if (currentWeaponObject) { currentWeaponObject.SetActive(false); } currentWeapon = obj.GetComponent <IGun>(); currentWeapon.SwitchIn(); currentWeaponObject = obj; currentWeaponObject.SetActive(true); }