This question was
closed Jan 16, 2017 at 05:43 PM by
KnightRiderGuy for the following reason:
OtherFound solution
Question by
KnightRiderGuy · Jan 16, 2017 at 03:20 PM ·
c#coroutinesaccessing from any scriptswitch-casecase
Can I access a Switch case from a Coroutine?
I have a long switch case set of functions in C# I'm wondering if I can access or maybe I should say trigger a specific case from a coroutine?
Something like:
IEnumerator HasThisBeenAsked(){
KITTmodesObject.KITT_isThinking = true;
yield return new WaitForSeconds (3.9f); // wait time
KITTmodesObject.KITT_isThinking = false;
Trigger the case statement called:
case: doYouLikeTheOcean;
}
My Switch statements are being called like this:
public void pressButtonForCommand(string command)
{
switch (command) {
//Do Stuff
}
break;
Comment