Example #1
0
    void OnTriggerEnter(Collider other)
    {
        if (other.tag == "Directory")
        {
            if (insert)
            {
                direct.LeftArmIn = false;
                Destroy(dropList);
                insert = false;
            }
            else if (!insert)
            {
                direct                    = other.GetComponent <Directory>();
                direct.LeftArmIn          = true;
                dropList                  = Instantiate(DropList, new Vector3(other.transform.position.x, other.transform.position.y + 0.6f, other.transform.position.z), Quaternion.identity) as GameObject;
                dropList.transform.parent = DiretoryBack.transform;
                dropList.transform.GetChild(1).gameObject.SendMessage("GetName", direct.directoryName);
                //dropList.rigidbody.isKinematic = false;
                //dropList.rigidbody.AddForce(new Vector3(0,2.0f,0));
                insert = true;
            }
        }

        if (other.tag == "Controlled")
        {
            TakeP                   = other.GetComponent <TakenParametrs>();
            TakeP.scfinger          = true;
            renderer.material.color = Color.cyan;
        }
    }
Example #2
0
    void OnTriggerEnter(Collider other)
    {
        if (other.tag == "Directory")
        {

            if (insert)
            {
                direct.LeftArmIn = false;
                Destroy(dropList);
                insert = false;
            }
            else if (!insert)
            {
            direct = other.GetComponent<Directory>();
            direct.LeftArmIn = true;
            dropList = Instantiate(DropList,new Vector3(other.transform.position.x , other.transform.position.y +0.6f, other.transform.position.z), Quaternion.identity) as GameObject;
                dropList.transform.parent = DiretoryBack.transform;
                dropList.transform.GetChild(1).gameObject.SendMessage("GetName", direct.directoryName);
            //dropList.rigidbody.isKinematic = false;
            //dropList.rigidbody.AddForce(new Vector3(0,2.0f,0));
                insert = true;
            }

        }

        if (other.tag == "Controlled")
        {
            TakeP = other.GetComponent<TakenParametrs>();
            TakeP.scfinger = true;
            renderer.material.color = Color.cyan;
        }
    }
Example #3
0
    void OnTriggerEnter(Collider other)
    {
        if (other.tag == "Directory")
        {
            direct = other.GetComponent<Directory>();
            direct.RightArmIn = true;
        }
        if (other.tag == "Back")
        {
            other.gameObject.SendMessage("Backward");
        }
        if (other.tag == "Image")
        {
            img = other.GetComponent<ImageIcon>();
            img.RightArmIn = true;
            imge = other.gameObject;

        }
        if (other.tag == "ImageViewer")
        {
        imge.gameObject.SendMessage("Stop");
        }

        if (other.tag == "Presentation")
        {
            present = other.GetComponent<PresentationIcon>();
            present.RightArmIn = true;
        }

        if (other.tag == "Car Presentation")
        {
            networkScript = GameObject.Find("AppManager").GetComponent<NetworkScript2>();
            //networkScript.isLevelToLoadReceived = false;
            Application.LoadLevel(2);
        }

        if(other.tag == "Close"){
            imageIcon = GameObject.Find("Image Icon(Clone)").GetComponent<ImageIcon>();
            Invoke("InvokeClose", 1.0f);
        }

        if(other.tag == "Chart"){
            startPos = new Vector3 (transform.position.x, transform.position.y, transform.position.z);
            isSizeChanged = false;
            Debug.Log(startPos);
        }
        if (other.tag == "Controlled")
        {
            TakeP = other.GetComponent<TakenParametrs>();
            defaulted = transform.eulerAngles.y;
            defaultAngle = other.transform.eulerAngles.y;
            TakeP.fstfinger = true;
            renderer.material.color = Color.green;
        }

        if(other.tag == "ChartClose"){
            Debug.Log("CloseChart-----------------------------");
            Invoke("InvokeCloseChart", 1.0f);
        }
    }
Example #4
0
    void OnTriggerEnter(Collider other)
    {
        if (other.tag == "Directory")
        {
            direct            = other.GetComponent <Directory>();
            direct.RightArmIn = true;
        }
        if (other.tag == "Back")
        {
            other.gameObject.SendMessage("Backward");
        }
        if (other.tag == "Image")
        {
            img            = other.GetComponent <ImageIcon>();
            img.RightArmIn = true;
            imge           = other.gameObject;
        }
        if (other.tag == "ImageViewer")
        {
            imge.gameObject.SendMessage("Stop");
        }

        if (other.tag == "Presentation")
        {
            present            = other.GetComponent <PresentationIcon>();
            present.RightArmIn = true;
        }


        if (other.tag == "Car Presentation")
        {
            networkScript = GameObject.Find("AppManager").GetComponent <NetworkScript2>();
            //networkScript.isLevelToLoadReceived = false;
            Application.LoadLevel(2);
        }

        if (other.tag == "Close")
        {
            imageIcon = GameObject.Find("Image Icon(Clone)").GetComponent <ImageIcon>();
            Invoke("InvokeClose", 1.0f);
        }

        if (other.tag == "Chart")
        {
            startPos      = new Vector3(transform.position.x, transform.position.y, transform.position.z);
            isSizeChanged = false;
            Debug.Log(startPos);
        }
        if (other.tag == "Controlled")
        {
            TakeP                   = other.GetComponent <TakenParametrs>();
            defaulted               = transform.eulerAngles.y;
            defaultAngle            = other.transform.eulerAngles.y;
            TakeP.fstfinger         = true;
            renderer.material.color = Color.green;
        }

        if (other.tag == "ChartClose")
        {
            Debug.Log("CloseChart-----------------------------");
            Invoke("InvokeCloseChart", 1.0f);
        }
    }