private void OnCollisionEnter2D() { if (!this.dead) { this.MakeFlingable(); PitchHandler.Play(audioSource, this.chaserRigidbody.velocity.magnitude, "chaser"); } }
private void OnMouseUp() { if (!chaser.dead) { if (MouseIsBelowBall() && !levelController.levelComplete) { levelController.firstFlingHappened = true; chaser.Jump(CalculateDirection()); // why calculate direction for one and calculate angle for other? is this why they decouple? chaserPointer.Reset(); PitchHandler.Play(audioSource, 1, "flinger"); lar.SetLineReady(false); } } }
private void OnMouseDown() { if (!chaser.dead) { if (MouseIsBelowBall()) { this.UpdatePointerAndArc(); PitchHandler.Play(audioSource, 1, "flinger"); } else { levelController.firstScrollHappened = true; cameraMover.MoveUp(cameraMover.voluntarySpeed); NeutralisePointerAndArc(); } } }