Exemplo n.º 1
0
    void Start()
    {
        levelManager.levelCompleted += OnLevelCompleted;
        levelManager.levelFailed    += OnLevelFailed;

        levelMenu.Init(8, 2, PlayLevel);
        ShowMainMenu();
    }
Exemplo n.º 2
0
    private void Start()
    {
        menu = new Menu(menuObject);
        menu.Init();
        menu.PlayClicked = ChangeToLevelMenu;

        levelMenu = new LevelMenu(levelMenuObject);
        levelMenu.Init();
        levelMenu.BackClicked      = ChangeToMenu;
        levelMenu.LoadLevelClicked = ChangeToLevel;

        gameplay = new Gameplay(gameplayObject);
        gameplay.Init();
        gameplay.LeaveClicked = ChangeToLevelMenu;
        gameplay.WinOccured   = ChangeToComplete;

        complete = new Complete(completeObject);
        complete.Init();
        complete.MenuClicked = ChangeToMenu;
        complete.NextClicked = ChangeToLevel;
        complete.SendClicked = SendScore;

        ChangeToMenu();
    }