void OnTriggerEnter2D(Collider2D other) { Shooting otherShooting = other.gameObject.GetComponent <Shooting>(); otherShooting.SetTemporaryWeapon(weaponType, weaponDuration); Destroy(gameObject); }
void OnTriggerEnter2D(Collider2D other) { Shooting otherShooting = other.gameObject.GetComponent <Shooting>(); otherShooting.SetTemporaryWeapon(weaponType, weaponDuration); Destroy(gameObject); }