Example #1
0
    // Use this for initialization
    private void Start()
    {
        m_heatSlider = gameObject.AddComponent<Slider>();

        m_heatSlider.CreateSlider("Heat - ",
                                new Rect(Screen.width - 190, (Screen.height - 65), 100, 30),
                                new Rect(Screen.width - 100, (Screen.height - 60), 100, 30),
                                100);

        m_pressureSlider = gameObject.AddComponent<Slider>();

        m_pressureSlider.CreateSlider("Pressure - ",
                                new Rect(Screen.width - 190, (Screen.height - 35), 100, 30),
                                new Rect(Screen.width - 100, (Screen.height - 30), 100, 30),
                                100);

        m_heatSlider.PropertyChanged += new PropertyChangedEventHandler(EventHandler);
    }