private void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.CompareTag("Player"))
        {
            GetComponent <GameObject>();
            //  GetComponent<Animation>().Play("Press2");
            GetComponent <AudioSource>().Play();

            print("Button 2 Triggered");

            Puzzle1Script1.Button2Pressed();
        }
    }
    private void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.CompareTag("Player"))
        {
            GetComponent <GameObject>();
            GetComponent <Animation>().Play("Press1");
            GetComponent <AudioSource>().Play();

            print("Button 1 Triggered");

            Puzzle1Script1.Button1Pressed();

            if (Puzzle1Script1.button1)
            {
                rend3.sharedMaterial = buttonMaterial3[1];
            }
        }
    }
Beispiel #3
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.CompareTag("Player"))
        {
            GetComponent <GameObject>();
            GetComponent <Animation>().Play("Press7");
            GetComponent <AudioSource>().Play();

            print("Button 7 Triggered");

            Puzzle1Script1.Button7Pressed();

            //if (Puzzle1Script.order == 6)
            //{
            //    rend3.sharedMaterial = buttonMaterial3[1]; // blue
            //    print("3toBlue");
            //}
        }
    }