Created
April 16, 2015 15:50
-
-
Save carlows/79f3759af1b2226e1439 to your computer and use it in GitHub Desktop.
Get component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void OnTriggerEnter2D(Collider2D other){ | |
if(other.transform.tag == "Player"){ | |
var respawnScript = other.gameObject.GetComponent<Script>(); | |
respawnScript.Respawn(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment