// Update is called once per frame void Update() { switch (GameManager.Instance.state) { case game.mainmenu: break; case game.credits: break; case game.pause: break; case game.game: switch (state) { case gamestate.init: if (!switchingit) { StartCoroutine(Switchme()); } break; case gamestate.p1active: if (Inputs.A_Button()) { Transition(gamestate.switching); } setP1Active(); break; case gamestate.p2active: if (Inputs.A_Button()) { Transition(gamestate.switching); } setP2Active(); break; case gamestate.switching: if (!switchingit) { StartCoroutine(Switchme()); } break; } break; } }