protected void OnTriggerExit(Collider other) { if (other.gameObject == gameController.boundOuter) { Bouncer.Bounce(body, other.transform, Bouncer.BounceTowards.Inwards); } }
//void UpdateLineRenderer() //{ // for (int i = 0; i < lineJoints.Length; i++) // { // lineRenderer.SetPosition(i, lineJoints[i].position); // } //} public void Die() { AudioManager.activeManager.PlayClipFromLibrary(2, transform.position, false); GameManager.active.State = GameManager.GameState.GAME_OVER; headBouncer.Bounce(); bodyBouncer.Bounce(); tailBouncer.Bounce(); }
void Bouncing() { if (_currentBouncer != null) { if (_inBouncer && _jumpDown && _controller.Ground()) { _currentBouncer.Bounce(_controller.GetRigidbody()); } } }