Ejemplo n.º 1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.name == "Valla" && zonestate.enabled == true)
     {
         machine.ActivateState(machine.escapeState);
     }
     if (collision.name == "Ball" && collision.GetComponent <AtackState>().enabled == true)
     {
         puppymanager.puppys.Remove(gameObject);
         puppymanager.distances.Remove(gameObject.transform.position.x);
         puppymanager.mindistance = 10f;
         machine.life--;
         machine.ActivateState(machine.kickedState);
     }
 }
Ejemplo n.º 2
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.CompareTag("Spamer") && transform.position == machine.initpos)
     {
         puppymanager.puppys.Add(gameObject);
         puppymanager.distances.Add(gameObject.transform.position.x);
         machine.ActivateState(machine.zoneState);
         parab.t = 0;
     }
 }
Ejemplo n.º 3
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.name == "Player")
     {
         puppymanager.puppys.Remove(gameObject);
         puppymanager.distances.Remove(gameObject.transform.position.x);
         puppymanager.mindistance = 20f;
         machine.life--;
         machine.ActivateState(machine.kickedState);
     }
 }