// Update is called once per frame void Update() { switch (mCurState) { case EState.eOpening: if (!MC_MenuBG.isPlaying()) { state = EState.eStay; } break; case EState.eStay: mStateTimer += Time.deltaTime; if (mStateTimer >= WAIT_FOR_SHOW_MENU) { state = EState.eShowMenu; } break; } }