Created
June 11, 2018 09:32
-
-
Save walkies/16427a4521301818f03844e4da6b2414 to your computer and use it in GitHub Desktop.
rip
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
public class RIP : MonoBehaviour | |
{ | |
public GameObject me; | |
void Start() | |
{ | |
StartCoroutine(StartCountdown()); | |
} | |
public IEnumerator StartCountdown(int countdownValue = 1) | |
{ | |
while (countdownValue > 0) | |
{ | |
yield return new WaitForSeconds(1.0f); | |
Destroy(me); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment