Ejemplo n.º 1
0
    public void Close()
    {
        AppManager.Instance.UIManager.PopupManager.gameObject.SetActive(false);

        gameObject.SetActive(false);

        chosenEntry = null;

        MoreInfoTutorialObject.transform.SetParent(transform);

        if (!TutorialHasBeenShown && TipBeingShown)
        {
            HideTip();
        }

        //todo: cerrar también el popup de Info si estaba abierto :/
    }
Ejemplo n.º 2
0
    public void Open(List<PowerExample> zListOfPowersToShow, Action<Power> zActionWhenChosen = null)
    {
        if (!AppManager.Instance.UIManager.PopupManager.CanOpen)
            return;

        AppManager.Instance.SoundManager.Play("Pick");

        AppManager.Instance.UIManager.PopupManager.gameObject.SetActive(true);

        gameObject.SetActive(true);

        LoadEntries(zListOfPowersToShow);

        chosenEntry = null;
        ActionWhenChosen = zActionWhenChosen;

        if (!TutorialHasBeenShown)
        {
            StartCoroutine(TutorialTip());
        }
    }
Ejemplo n.º 3
0
    public void Select(PowerExample zPower)
    {
        foreach (PowerPickSlot entry in Entries)
        {
            if (entry.PowerExample.Power.Name == zPower.Power.Name)
            {
                chosenEntry = entry;
                entry.Select();
            }
            else
            {
                entry.Select(false);
            }
        }

        if (chosenEntry == null)
        {
            Debug.LogError("Error selecting power");
            return;
        }

        CenterOnEntry(chosenEntry);
    }
Ejemplo n.º 4
0
    void CenterOnEntry(PowerPickSlot zSlot)
    {
        if(MoreInfoTutorialObject.activeInHierarchy)
        {
            HideTip();
        }

        //todo: Arreglar
        //SnapTo(chosenEntry.GetComponent<RectTransform>());
    }
Ejemplo n.º 5
0
    public void Select(PowerPickSlot zSlot)
    {
        foreach (PowerPickSlot entry in Entries)
        {
            if (entry == zSlot)
            {
                chosenEntry = entry;
                entry.Select();
            }
            else
            {
                entry.Select(false);
            }
        }

        CenterOnEntry(chosenEntry);
    }