Exemplo n.º 1
0
 private void OnCollisionEnter2D()
 {
     if (!this.dead)
     {
         this.MakeFlingable();
         PitchHandler.Play(audioSource, this.chaserRigidbody.velocity.magnitude, "chaser");
     }
 }
Exemplo n.º 2
0
 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);
         }
     }
 }
Exemplo n.º 3
0
 private void OnMouseDown()
 {
     if (!chaser.dead)
     {
         if (MouseIsBelowBall())
         {
             this.UpdatePointerAndArc();
             PitchHandler.Play(audioSource, 1, "flinger");
         }
         else
         {
             levelController.firstScrollHappened = true;
             cameraMover.MoveUp(cameraMover.voluntarySpeed);
             NeutralisePointerAndArc();
         }
     }
 }
Exemplo n.º 4
0
 private void Awake()
 {
     Instance = this;
 }
Exemplo n.º 5
0
 // ---------------------------------------------------------------------
 void onPitchCorrectionChanged()
 {
     pitchHandler = pitchCorrection ? (PitchHandler)applyPitchCorrectedInput : (PitchHandler)applyPitchInput;
 }