Exemplo n.º 1
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.name.Contains("Pusher") && !initiate_button.initiate_game && !game_manager.showEnd)
        {
            //SceneManager.LoadScene("Chopstick Test", LoadSceneMode.Single);
            end_transport.Play();
            end_button.Play();
            loadchopstick = true;
            transport_effect.transport_out = true;
            tracker.SaveLastLevel("holodeck");
        }

        //Debug.Log(other.name);
    }
Exemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        time += Time.deltaTime;

        if (time >= light_flicker_delay && time <= (light_flicker_delay + sushilogo[0].clip.length * light_flicker_times))
        {
            foreach (Animation a in sushilogo)
            {
                a.Play();
            }
            foreach (Animation a in lamp1)
            {
                a.Play();
            }
            foreach (Animation a in lamp2)
            {
                a.Play();
            }

            if (play_spark_sound && spark_sound_delay < sushilogo[0].clip.length)
            {
                spark.Play();
                play_spark_sound = false;
                Debug.Log("Play Spark");
            }
            else if (spark_sound_delay >= sushilogo[0].clip.length)
            {
                play_spark_sound  = true;
                spark_sound_delay = 0f;
            }

            spark_sound_delay += Time.deltaTime;
        }

        if (time >= (light_flicker_delay + sushilogo[0].clip.length * light_flicker_times) && play_explode)
        {
            buzz.Stop();
            explode.Play();
            play_explode = false;
        }

        if (time >= alien_burst_delay && time <= (alien_burst_delay + chestburster[0].clip.length))
        {
            burst_spot.SetActive(true);
            foreach (Animation a in chestburster)
            {
                a.Play();
            }
            if (play_burst)
            {
                burst = GameObject.Find("XenomorphChestburst").GetComponent <AudioSource>();
                burst.Play();
                play_burst = false;
            }
        }
        if (time >= (alien_burst_delay + chestburster[0].clip.length + .01f))
        {
            burst_spot.SetActive(false);
        }

        if (time >= tracker_delay)
        {
            tracker_dot.SetActive(true);
        }

        if (time >= alien_dance_delay)
        {
            dance_alien.SetActive(true);
            spot_light.SetActive(true);
            door.SetActive(true);
        }

        if (time >= end_of_scene && !do_not_end)
        {
            //SceneManager.LoadScene(0, LoadSceneMode.Single);
            tracker.SaveLastLevel("alienz");
            loadchopstick = true;
        }
    }