Exemplo n.º 1
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();
    }
Exemplo n.º 2
0
        public void initialization()
        {
            sliderGestureControl = GetComponent <SliderGestureControl>();
            gestureInteractive   = GetComponent <GestureInteractive>();

            //this fires, when the slider bar changes its value
            sliderGestureControl.OnUpdateEvent.AddListener(onSliderBarUpdate);
            //sliderGestureControl.OnUpdateEvent += ;
        }
Exemplo n.º 3
0
 private void Awake()
 {
     if (label == null)
     {
         label = this.gameObject.GetComponentInChildren <TextMesh>();
     }
     sliderGestureControl = GetComponent <SliderGestureControl>();
     originalScale        = targetObject.transform.localScale;
     prevSliderValue      = sliderGestureControl.SliderValue;
 }
Exemplo n.º 4
0
        /// <summary>
        /// 初期化処理
        /// </summary>
        private void Start()
        {
            StartCoroutine(AuthCoroutine());
            sliderGestureControl = slider.GetComponent <SliderGestureControl>();

            // IPDの設定可能な幅は50から80までとする。
            // Sliderコンポーネントを簡単に利用するため、
            // Min Slider Value 0, Max Slider Value 30に設定。
            ipd           = (sliderGestureControl.SliderValue + 50) * 1000;
            ipdLabel.text = (ipd / 1000).ToString("0");
        }
Exemplo 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("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);
    }
Exemplo 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("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);
    }
Exemplo n.º 7
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);
    }
Exemplo n.º 8
0
    // Use this for initialization
    void Start()
    {
        pistonsController = GameObject.FindObjectOfType <PistonsController>();
        SpeedSlider       = GameObject.Find("SpeedSlider");

        speedSlider      = SpeedSlider.GetComponent <SliderGestureControl>();
        CollectiveSlider = GameObject.Find("CollectiveSlider");
        collectiveSlider = CollectiveSlider.GetComponent <SliderGestureControl>();
        SizeSlier        = GameObject.Find("SizeSlider");
        sizeSlider       = SizeSlier.GetComponent <SliderGestureControl>();
        AirFlow          = GameObject.Find("windEffectSwitch");
        airFlow          = AirFlow.GetComponent <ButtonEvent>();
        sizeOld          = sizeSlider.SliderValue;

        Sharing = GameObject.Find("/Sharing");
        Sharing.SetActive(false);
    }
Exemplo n.º 9
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
    }
Exemplo n.º 10
0
 void Awake()
 {
     sliderControl = GetComponent <SliderGestureControl>();
 }
Exemplo n.º 11
0
 // Update is called once per frame
 void Start()
 {
     house        = GameObject.Find("FakeSliderRotate");
     rotateSlider = house.GetComponent <SliderGestureControl>();
 }