Exemple #1
0
 void OnTriggerEnter2D(Collider2D col)
 {
     if (col.tag == "Player")
     {
         Debug.Log("hit");
         pS = col.gameObject.GetComponent <playerStats>();
         pS.Respawn();
     }
 }
Exemple #2
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.tag != "Player")
        {
            return;
        }

        player_stats.Respawn();
    }