Пример #1
0
 void OnTriggerExit2D(Collider2D other)
 {
     if (other.gameObject.GetComponent <BallMover>() != null)
     {
         other.GetComponent <BallMover> ().JumpOut();
         if (soundManager != null)
         {
             soundManager.cueSFX3();
         }
     }
 }
Пример #2
0
 //Called when this target is hit by the ball
 public void OnTargetHit()
 {
     //If we can get the ElectroFieldScript component (sometimes we have a collision on frame 1 before Start() is called)
     if (ElectroObject != null && ElectroObject.GetComponent <ElectroFieldScript>())
     {
         if (soundManager != null)
         {
             soundManager.cueSFX3();
         }
         StartCoroutine(ElectroObject.GetComponent <ElectroFieldScript>().StartGrowTimer(SecondsToGrow, GrowAmountOnHit));
     }
 }