Esempio n. 1
0
    public void getSlider_SphereSize()
    {
        GameObject           slider       = GameObject.Find("Sphere_Size_Slider");        // Grab sphere size slider from scene
        SliderGestureControl sliderScript = slider.GetComponent <SliderGestureControl>(); // Grab script off of slider

        sliderValueMainMenu_SphereSize = sliderScript.GetSliderValue();
    }
Esempio n. 2
0
    // Get slider value, called by slider's event update
    public void getSlider()
    {
        // Get the slider's current value
        GameObject           slider       = GameObject.Find("Sphere_Size_Slider");        // Grab sphere size slider from scene
        SliderGestureControl sliderScript = slider.GetComponent <SliderGestureControl>(); // Grab script off of slider

        sliderValue = sliderScript.GetSliderValue();
    }
Esempio n. 3
0
    // Get slider value, called by slider's event update
    public void getSlider()
    {
        // Get the slider's current value
        GameObject slider = GameObject.Find("Collection_Size_Slider");                    // Grab collection size slider from scene

        SliderGestureControl sliderScript = slider.GetComponent <SliderGestureControl>(); // Grab script off of slider
        float sliderValue = sliderScript.GetSliderValue();

        // Change the sphere collection size according to the slider value
        GameObject sphere_collection = GameObject.Find("SpawnHotSpots");         // Grab the collection from scene

        sphere_collection.transform.localScale = new Vector3(sliderValue, sliderValue, sliderValue);
    }
Esempio n. 4
0
    // Get slider value, called by slider's event update
    public void getSlider()
    {
        // Get the slider's current value
        GameObject           slider       = GameObject.Find("Height_Slider");             // Grab height slider from scene
        SliderGestureControl sliderScript = slider.GetComponent <SliderGestureControl>(); // Grab script off of slider
        float sliderValue = sliderScript.GetSliderValue();

        // Get the distance slider's value
        GameObject           distance_slider       = GameObject.Find("Distance_Slider"); // Grab distance slider from scene
        SliderGestureControl distance_sliderScript = distance_slider.GetComponent <SliderGestureControl>();
        float distance_sliderValue = distance_sliderScript.GetSliderValue();

        // Move the sphere collection according to the slider value
        GameObject sphere_collection = GameObject.Find("SpawnHotSpots");         // Grab the collection from scene

        sphere_collection.transform.position = new Vector3(0.0f, sliderValue, distance_sliderValue);
    }
Esempio n. 5
0
    // Get slider value, called by slider's event update
    public void getSlider()
    {
        // Get the slider's current value
        GameObject           slider       = GameObject.Find("Distance_Slider");           // Grab distance slider from scene
        SliderGestureControl sliderScript = slider.GetComponent <SliderGestureControl>(); // Grab script off of slider
        float sliderValue = sliderScript.GetSliderValue();

        // Get the height slider's value
        GameObject           height_slider       = GameObject.Find("Height_Slider"); // Grab height slider from scene
        SliderGestureControl height_sliderScript = height_slider.GetComponent <SliderGestureControl>();
        float height_sliderValue = height_sliderScript.GetSliderValue();

        // Move the task's object collection according to the slider value
        GameObject task_objects = GameObject.Find("SpawnHotSpots");         // Grab the task objects from scene

        task_objects.transform.position = new Vector3(0.0f, height_sliderValue, sliderValue);
    }
Esempio n. 6
0
    // Get slider value, called by slider's event update
    public void getSlider()
    {
        // Get the slider's current value
        GameObject           slider       = GameObject.Find("Sphere_Size_Slider");        // Grab sphere size slider from scene
        SliderGestureControl sliderScript = slider.GetComponent <SliderGestureControl>(); // Grab script off of slider

        sliderValue = sliderScript.GetSliderValue();

        // Fill the static_spheres list with all the static spheres in the scene
        GameObject[] static_sphere_array;
        static_sphere_array = GameObject.FindGameObjectsWithTag("static_sphere");

        // Change all the static sphere sizes according to the slider value
        foreach (GameObject static_sphere in static_sphere_array)
        {
            static_sphere.transform.localScale = new Vector3(sliderValue, sliderValue, sliderValue);
        }

        // Grab the trigger point sphere from the scene
        trigger_sphere = GameObject.FindGameObjectWithTag("trigger_sphere");

        // Change the trigger sphere size according to the slider value
        trigger_sphere.transform.localScale = new Vector3(sliderValue + 0.026f, sliderValue + 0.026f, sliderValue + 0.026f);         // Make the trigger slightly larger than the static points
    }