Exemple #1
0
    void Start()
    {
        DataBaseHandler    db = DataBaseHandler.Instance;
        GlobalPanelHandler ph = GlobalPanelHandler.Instance;

        aceptNewUser.onClick.AddListener(() =>
        {
            int x = int.Parse(age.text);
            db.CreateNewPlayer(nick.text, nombre.text, lname.text, x, correo.text);
            nick.text   = "";
            nombre.text = "";
            lname.text  = "";
            age.text    = "";
            correo.text = "";
            ph.PanelShowOff();
            db.UpdatePlayersDropdown(playersDrops);
        });

        cancelNewUser.onClick.AddListener(() =>
        {
            ph.PanelShowOff();
            nick.text   = "";
            nombre.text = "";
            lname.text  = "";
            age.text    = "";
            correo.text = "";
        });
    }
    void Start()
    {
        ph = GlobalPanelHandler.Instance;
        sm = SCManager.Instance;
        ch = CameraHandler.Instance;
        ws = WinstonStats.Instance;
        gs = GameStatus.Instance;
        da = DiaryAnimation.Instance;


        continuar.onClick.AddListener(() =>
        {
            displayInGameMenu(menuIsOn);
        });

        goMainMenu.onClick.AddListener(() => sm.LoadScene(sm.ReturnLastSceneName()));

        exitGame.onClick.AddListener(() => Application.Quit());

        StartCoroutine(EndGameChecker());

        guardarSalir.onClick.AddListener(() => SaveExit());

        playAgain.onClick.AddListener(() => sm.LoadScene("game1"));

        menuPrincipal.onClick.AddListener(() => sm.LoadScene("start"));
    }
    // Use this for initialization
    void Start()
    {
        GlobalPanelHandler ph = GlobalPanelHandler.Instance;
        DataBaseHandler    db = DataBaseHandler.Instance;
        SCManager          sm = SCManager.Instance;

        startGameButton.onClick.AddListener(() =>
        {
            ph.HoverShowUp(HoverPanel);
            ph.PanelShowUp(JugarPartidaPanel);
        });
        historialButton.onClick.AddListener(() =>
        {
            ph.HoverShowUp(HoverPanel);
            ph.PanelShowUp(Historial);
        });

        exitButton.onClick.AddListener(() =>
        {
            Application.Quit();
        });

        HoverButton.onClick.AddListener(() =>
        {
            ph.HoverShowOff(HoverPanel);
            ph.PanelShowOff();
        });

        ngAceptButton.onClick.AddListener(() =>
        {
            db.CreateGame("Game1");
            sm.LoadScene("game1");
        });

        ngCancelButton.onClick.AddListener(() =>
        {
            ph.HoverShowOff(HoverPanel);
            ph.PanelShowOff();
        });

        db.UpdatePlayersDropdown(playersDrops);

        ngNewUser.onClick.AddListener(() =>
        {
            ph.PanelShowUp(NewUser);
        });
    }
    // Use this for initialization
    void Start()
    {
        dbh = DataBaseHandler.Instance;
        ph  = GlobalPanelHandler.Instance;

        dbh.UpdatePlayersDropdown(Jugadores);
        Jugadores.onValueChanged.AddListener((b) =>
        {
            dbh.UpdateGamesDropdown(Jugadores.captionText.text, Partidas);
        });
        dbh.UpdateGamesDropdown(Jugadores.captionText.text, Partidas);

        volver.onClick.AddListener(() =>
        {
            ph.HoverShowOff(HoverPanel);
            ph.PanelShowOff();
        });

        buscarHistorial.onClick.AddListener(() => SearchHistory());
    }