Ejemplo n.º 1
0
    public override void Enter()
    {
        gm           = context.GetGameManager();
        uiMng        = gm.GetUIManager();
        endGamePanel = uiMng.GetMenu <UIMenu_EndGame>();
        spawnCtrl    = gm.GetSpawnController();
        printCtrl    = gm.GetPrintController();
        bgMng        = gm.GetBackgroundManager();
        musicCtrl    = gm.GetMusicController();

        endGamePanel.RetyButtonPressed     = RetryButtonPressed;
        endGamePanel.MainMenuButtonPressed = MainMenuButtonPressed;

        printCtrl.EndGameAnimation(OnPrinterAnimationEnd);
    }
Ejemplo n.º 2
0
    public override void Enter()
    {
        startState = false;
        adsMng     = UnityAdsManager.instance;
        gm         = context.GetGameManager();
        spawnCtrl  = gm.GetSpawnController();
        uiMng      = gm.GetUIManager();
        shapeCtrl  = gm.GetShapeController();
        bgMng      = gm.GetBackgroundManager();
        printCtrl  = gm.GetPrintController();
        scoreCtrl  = gm.GetScoreController();
        musicCtrl  = gm.GetMusicController();

        PrintController.OnShapeGuessed += HandleOnShapeGuessed;
        PrintController.OnShapeWrong   += HandleOnShapeWrong;
        ShapeController.OnShapeChanged += HandleOnShapeChange;
        ShapeController.OnNewShapeAdd  += HandleOnNewShapeAdd;
        gm.OnGameEnd += HandleOnGameEnd;

        gameplayPanel = uiMng.GetMenu <UIMenu_Gameplay>();
        printCtrl.EnableGraphic(false);
        uiMng.SetCurrentMenu <UIMenu_Gameplay>(0.5f, 0.5f, OnGameplayFadeIntCallback, OnGameplayFadeOutCallback);
    }