private void OnCollisionEnter(Collision other) { FMODUnity.RuntimeManager.PlayOneShot(throwableSFX, transform.position); if (enableInteract || hasHit) { return; } noisePing.SpawnNoisePing(other); hasHit = true; }
private void OnCollisionEnter(Collision other) { if (!hasBeenBumped || hasHit || other.gameObject.CompareTag("Player")) { return; } noisePing.SpawnNoisePing(other); hasHit = true; UIManager.Instance.staminaBar.InstantIncreaseAwakenessBy(awakenessIncreasePercentage); OnHit?.Invoke(); if (fadeAndDestroyAfterThrow) { ObjectFader objectFader = GetComponent <ObjectFader>(); if (objectFader) { objectFader.FadeToTransparent(destroyAfterSeconds, fadeAndDestroyAfterThrow); } } }