public void BiteBanana() { if (isGrabbed == false) { return; } if (!bittenOnce) { bittenOnce = true; banana_ChompSound.Play(); halfRenderers[1].enabled = false; halfColliders[1].enabled = false; return; } banana_ChompSound.Play(); halfRenderers[0].enabled = false; halfColliders[0].enabled = false; if (m_CurrentController != null) { m_CurrentController.ToggleControllerModel(true); } StartCoroutine(BananaDestroy()); }
private void Explode() { base.OnGrabReleased(); if (m_CurrentController != null) { m_CurrentController.ToggleControllerModel(true); } Instantiate(grenadeParticlePrefab, transform.position, grenadeParticlePrefab.transform.rotation, null); Destroy(gameObject); }