예제 #1
0
 public void OnThrow()
 {
     //play the sound
     audio.playTiro();
     //show the trail renderer
     GetComponent <TrailRenderer>().enabled = true;
     //make the collider normal size
     GetComponent <CircleCollider2D>().radius = Constants.BirdColliderRadiusNormal;
     State = BirdState.Thrown;
 }
예제 #2
0
 public void OnThrow()
 {
     //sonar el Tiro
     audio.playTiro();
     //activar el trailRenderer
     GetComponent <TrailRenderer>().enabled = true;
     //allow for gravity forces
     GetComponent <Rigidbody2D>().isKinematic = false;
     //Establecer el collider a un radio normal
     GetComponent <CircleCollider2D>().radius = Constants.BirdColliderRadiusNormal;
     State = BirdState.Thrown;
 }