Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- StartCoroutine("functioncalls", 2f);
- StartCoroutine(functioncalls());
- void Call()
- {
- Invoke("FunctionCall",2f);
- }
- void FunctionCall()
- {
- Debug.Log("this function run");
- }
- void Call()
- {
- StartCoroutine(functioncalls());
- }
- IEnumerator functioncalls()
- {
- yield return new WaitForSeconds(2f);
- Debug.Log("this function run");
- }
- IEnumerator Countdown(int seconds)
- {
- while (seconds > 0) {
- Debug.Log(seconds);
- seconds--;
- yield return new WaitForSeconds(1f);
- }
- Debug.Log("Go!);
- }
- StartCoroutine(Countdown(10));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement