Last active
May 9, 2018 17:42
-
-
Save ohiofi/70afef5855a078da0d607ee24733f503 to your computer and use it in GitHub Desktop.
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
private void OnCollisionEnter2D(Collision2D coll){ | |
if (coll.transform.tag == "Player") { | |
var audioSource = GetComponent<AudioSource> (); | |
if (audioSource != null) { | |
audioSource.PlayOneShot (deathClip); | |
} | |
Instantiate(playerDeathPrefab, coll.contacts[0].point, Quaternion.identity); | |
sr.sprite = hitSprite; | |
//Destroy(coll.gameObject) | |
//GameManager.instance.RestartLevel (1.25f); | |
SoyBoyController obj = new SoyBoyController(); | |
coll.transform.position = obj.startPosition; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment