Esempio n. 1
0
    public void ChangeMenu(string menu)
    {
        if (menu == "Back")
        {
            Name.text = NameData;
            Ip.text   = IpData;
            Port.text = PortData;
            //////////////////////////////////////////////////////
            if (StreamBtData == "FLASK")
            {
                if (StreamBt.isOn == true)
                {
                    StreamBt.Switching();
                }
            }
            else
            {
                if (StreamBt.isOn == false)
                {
                    StreamBt.Switching();
                }
            }
            //////////////////////////////////////////////////////
            if (PreSelected != null)
            {
                PreSelected.SetBool("Open", true);
                StartCoroutine(DisablePanelDeleyed(PreSelected));
                PreSelected = null;
            }
        }
        else if (menu == "Settings")
        {
            if (PreSelected == null)
            {
                anim_settings.gameObject.SetActive(true);
                anim_settings.SetBool("Open", false);
                PreSelected = anim_settings;
            }
            else
            {
                PreSelected.SetBool("Open", true);
                StartCoroutine(DisablePanelDeleyed(PreSelected));
                //PreSelected.gameObject.SetActive(false);

                anim_settings.gameObject.SetActive(true);
                anim_settings.SetBool("Open", false);
                PreSelected = anim_settings;
            }
        }
        else if (menu == "About")
        {
            if (PreSelected == null)
            {
                anim_about.gameObject.SetActive(true);
                anim_about.SetBool("Open", false);
                PreSelected = anim_about;
            }
            else
            {
                PreSelected.SetBool("Open", true);
                StartCoroutine(DisablePanelDeleyed(PreSelected));
                //PreSelected.gameObject.SetActive(false);

                anim_about.gameObject.SetActive(true);
                anim_about.SetBool("Open", false);
                PreSelected = anim_about;
            }
        }
    }
Esempio n. 2
0
 public void OnBeginDrag(PointerEventData eventData)
 {
     toggle.Switching();
 }