Skip to content

Instantly share code, notes, and snippets.

@walkies
Created June 11, 2018 09:32
Show Gist options
  • Save walkies/16427a4521301818f03844e4da6b2414 to your computer and use it in GitHub Desktop.
Save walkies/16427a4521301818f03844e4da6b2414 to your computer and use it in GitHub Desktop.
rip
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