示例#1
0
 // Sends event on file select using path
 // Then destroys the file browser
 private void SendFileSelectEvent(string path)
 {
     //OnFileSelect(path);
     //Cambiar_Enlazado.cambioP  = true;
     Cambiar_Enlazado.upContent();
     Edit_Transform_Objects.updateCard();
     GameEventMessage.SendEvent("ShowAgain");
     Destroy();
 }
示例#2
0
    // Update is called once per frame
    void Update()
    {
    #if UNITY_ANDROID
        if (GameObject.Find("FileBrowserUI") == null && !EventSystem.current.IsPointerOverGameObject(Input.GetTouch(0).fingerId) && CheckTouchElements.isOnlyTouchBackgroundAndroid)
    #endif
    #if UNITY_EDITOR || UNITY_STANDALONE
        //  if (Input.GetMouseButtonDown(0) && GameObject.Find("FileBrowserUI") == null  && GraphicRaycasterTest.isOnlyTouchBackground)
            #endif
        {
            Ray        ray = Camera.main.ScreenPointToRay(Input.mousePosition);
            RaycastHit hit;
            if (Physics.Raycast(ray, out hit) && hit.collider.gameObject.name == this.gameObject.name)
            {
                Debug.Log(hit.collider.gameObject.name);
                for (int i = 0; i < marcadores.Length; i++)
                {
                    if (marcadores[i] == hit.collider.gameObject)
                    {
                        marcador = i;
                        marcadores[i].GetComponent <Cambiar_Enlazado>().Active = true;
                        Manager.updateGreenLabel();
                        // Indica si selección la carta
                        if (marcador == 1 && ManagerTutorial.tutoState == 2 && ManagerTutorial.tuto)
                        {
                            ManagerTutorial.tutoState++;
                            ManagerTutorial.checkCardStep.Invoke();
                        }
                    }
                    else
                    {
                        marcadores[i].GetComponent <Cambiar_Enlazado>().Active = false;
                    }
                }

                Edit_Transform_Objects.updateCard();
            }
        }
    }