Esempio n. 1
0
    // Use this for initialization
    public void EntrarTienda(int previousHUDMenu)
    {
        this.previousHUDMenu = previousHUDMenu;

        if (GlobalData.saltoComprado)
        {
            BotonSalto.EnableButton(false);
        }
        if (GlobalData.dobleSaltoComprado)
        {
            BotonDobleSalto.EnableButton(false);
        }
        if (GlobalData.dashComprado)
        {
            BotonDash.EnableButton(false);
        }
        if (GlobalData.girarComprado)
        {
            BotonGirar.EnableButton(false);
        }
        if (GlobalData.agacharseComprado)
        {
            BotonAgacharse.EnableButton(false);
        }
        if (GlobalData.secretoComprado)
        {
            BotonSecreto.EnableButton(false);
        }


        animacionTienda = this.gameObject.GetComponent <Animation> ();
        animacionTienda.Play("TransicionInicialTienda", PlayMode.StopAll);

        fondoEstrellas.SetActive(true);
        animacionEstrellas = fondoEstrellas.GetComponent <Animation> ();
        animacionEstrellas.Play("TransicionInicialEstrellas", PlayMode.StopAll);

        Actualizar();

        dineroSalto.text      = PrecioSalto + "xp";
        dineroDobleSalto.text = PrecioDobleSalto + "xp";
        dineroDash.text       = PrecioDash + "xp";
        dineroGirar.text      = PrecioGirar + "xp";
        dineroAgacharse.text  = PrecioAgacharse + "xp";
        dineroSecreto.text    = PrecioSecreto + "xp";

        distanciaMaxima.text = GlobalData.metros + "m";         //Esto solo se actualiza cuando se abre la tienda ya que mientras no corre el personaje.
    }