Esempio n. 1
0
    void MoveObject(int Direction)
    {
        print(Direction);
        // 2 : mirror video + footprint
        if (Direction == 2)
        {
            print("inininininin 2");
            /* Video */
            Video.SetActive(true);
            movTexture.Play();
            //movAudio.Play();
            playedOnce = true;
        }

        // 3 : wallcode
        if (Direction == 3)
        {
            print("in ______3");
            //screamAudio.Play();
            //wall codes
            WallCode.SetActive(true);
            LastCode.SetActive(true);
            pic114.SetActive(true);
        }
    }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        Video.GetComponent <Renderer>().material.mainTexture = movTexture;
        movTexture.loop = false;

        flushAudio  = Flush.GetComponent <AudioSource>();
        movAudio    = Video.GetComponent <AudioSource>();
        beepAudio   = Beep.GetComponent <AudioSource>();
        screamAudio = Scream.GetComponent <AudioSource>();

        Video.SetActive(false);
        Footprint.SetActive(false);
        WallCode.SetActive(false);
        LastCode.SetActive(false);
        pic114.SetActive(false);
    }
Esempio n. 3
0
    // Update is called once per frame
    void Update()
    {
        // Flush
        if (Input.GetKeyDown(KeyCode.F1))
        {
            flushAudio.Play();
        }

        // Mirrow
        if (Input.GetKeyDown(KeyCode.F2))
        {
            Video.SetActive(true);
            movTexture.Play();
            movAudio.Play();
            playedOnce = true;
        }
        if (movTexture.isPlaying == false && playedOnce)
        {
            Video.SetActive(false);
            Footprint.SetActive(true);
        }

        // Beep (for footprint)
        if (Input.GetKeyDown(KeyCode.F3))
        {
            beepAudio.Play();
        }

        // Scream (for openning box)
        if (Input.GetKeyDown(KeyCode.F4))
        {
            screamAudio.Play();
        }

        // Codes on the wall
        if (Input.GetKeyDown(KeyCode.F5))
        {
            WallCode.SetActive(true);
            LastCode.SetActive(true);
        }
        if (Input.GetKeyDown(KeyCode.F6))
        {
            pic114.SetActive(true);
        }
    }
Esempio n. 4
0
    // Use this for initialization
    void Start()
    {
        //spR.Open ();
        //spR.ReadTimeout = 1;
        sp.Open();
        sp.ReadTimeout = 1;

        // for video
        Video.GetComponent <Renderer>().material.mainTexture = movTexture;
        movTexture.loop = false;
        //movAudio = Video.GetComponent<AudioSource>();

        playedOnce = false;
        Video.SetActive(false);
        Footprint.SetActive(false);
        WallCode.SetActive(false);
        LastCode.SetActive(false);
        pic114.SetActive(false);
    }