Exemplo n.º 1
0
        public override void DoAction(DemoUIElementAction action, params object[] vars)
        {
            if (!m_toggle.IsInteractable())
            {
                return;
            }

            if (action == DemoUIElementAction.Press)
            {
                m_toggle.isOn = !m_toggle.isOn;
            }
        }
Exemplo n.º 2
0
        public override void DoAction(DemoUIElementAction action, params object[] vars)
        {
            if (!m_slider.IsInteractable())
            {
                return;
            }

            if (action == DemoUIElementAction.Slide)
            {
                float slideAmount = ( float )vars[0];
                if (SingleStep)
                {
                    if (m_lastStep)
                    {
                        return;
                    }
                    m_lastStep = true;
                }

                if (m_slider.wholeNumbers)
                {
                    if (slideAmount > 0)
                    {
                        m_slider.value += 1;
                    }
                    else if (slideAmount < 0)
                    {
                        m_slider.value -= 1;
                    }
                }
                else
                {
                    m_slider.value += slideAmount;
                }
            }
        }
Exemplo n.º 3
0
 virtual public void DoAction(DemoUIElementAction action, params object[] vars)
 {
 }