Im doing a fighting game with 2 players. When one player dies the death animation calls a method at the end. The method tells the gameManager code that the game has ended and it can go back to start menu.
Id like the method to wait x seconds before going back to the start menu. I know i could do this by creating a method called GoBackToStart() which first WaitForSeconds(X) and then ShowStartMenu() and then i would call the GoBackToStart() in a StartCoroutine();
I dont like it cause i find it ugly to create extramethods which are called from only one place. Is there some way i can just have it all in the method called from the animation and wait X seconds and then call on the ShowStartMenu()?
Or do you have a better suggestion? Im new at Unity and im not sure what lies ahead. Best practice tips are apprecieated.