예제 #1
0
    IEnumerator WaitForAnimation()
    {
        yield return(new WaitForSeconds(2.2f)); // animation lasts 2 second

        if (completed)
        {
            if (MadLevel.hasExtension && MadLevel.CanContinue())   // check if this level has extension and can continue it
            // then continue
            {
                MadLevel.Continue();
            }
            else if (MadLevel.HasNextInGroup(MadLevel.Type.Level))     // if not extension, check if there is next level of type level
            // load it
            {
                MadLevel.LoadNextInGroup(MadLevel.Type.Level);
            }
            else     // otherwise load level select screen
            {
                controller.LoadLevelSelectScreen();
            }
        }
        else
        {
            // if not completed go back to the menu
            controller.LoadLevelSelectScreen();
        }
    }
예제 #2
0
 public void toMainGameScene()
 {
     //Application.LoadLevel("_MainGameScene");
     //MadLevel.LoadNext(MadLevel.Type.Level);
     MadLevel.Continue();
 }