Created
February 22, 2021 09:37
-
-
Save DraconInteractive/7f66ddd6254627b542c52ba2ebb18564 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 IEnumerator Type1 () { | |
AddResult("T1"); | |
//Do logic for type 1 | |
SetResult("T1", Result.Success); | |
} | |
public IEnumerator Type2 () { | |
AddResult("T2"); | |
//Conditional logic for type 2 | |
if (false) { | |
SetResult("T2", Result.Fail); | |
yield break; | |
} | |
SetResult("T2", Result.Success); | |
} | |
public IEnumerator TestRoutine () { | |
yield return StartCoroutine(Type1()); | |
var t1Result = ConsumeResult("T1"); | |
yield return StartCoroutine(Type2()); | |
var t2Result = ConsumeResult("T2"); | |
yield break; | |
} | |
public void Test () { | |
StartCoroutine(TestRoutine()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment