Example #1
0
    IEnumerator StartGame_IE()
    {
        if (!Game_Started)
        {
            Game_Started = true;
            Animator clips = GetComponent <Animator>();
            clips.keepAnimatorControllerStateOnDisable = true;


            clips.SetBool("StartAnim", true);
            yield return(new WaitForSeconds((float)(clips.runtimeAnimatorController.animationClips[0].length) / clips.GetFloat("Multiplier")));

            shipSpawner.start_game();
            clips.SetBool("StartAnim", false);

            GameManager.gameOver = false;
            Game_Started         = false;
        }
        yield break;
    }