I’m making a boss but for one of his phases I want him to do a series of attacks one after another. The first attack will be done for 5 seconds and then he will start doing a different attack for 5 seconds again. And once the entire coroutine is complete it will stop.
Current I am doing this:
IEnumerator HandleFTPatternState() {
FTPattern1();
yield return new WaitForSeconds(5f);
FTPattern2();
yield return new WaitForSeconds(5f);
FTPattern3();
yield return new WaitForSeconds(5f);
FTPattern4();
yield return new WaitForSeconds(5f);
}
This does go to the other attack pattern however he still does the previous one as well at the same time. How would I make it so that he only does say FTPattern3()
once he gets to it and not FTPatter1()
and FTPattern2()
at the same time?