Example #1
0
        /// <summary>
        ///
        /// </summary>
        public void Update()
        {
            if (m_Graphic == null)
            {
                return;
            }
            //
            if (m_UIEffect != null)
            {
                if (context.controllerInput.GetButtonDown(key))
                {
                    m_UIEffect.OnPointerEnter(null);
                }
                else if (context.controllerInput.GetButtonUp(key))
                {
                    m_UIEffect.OnPointerExit(null);
                }
            }
            else
            {
                m_Graphic.enabled = context.controllerInput.GetButton(key);

                /*
                 * if(context.controllerInput.GetButtonDown(key)){
                 *      m_Graphic.enabled=true;
                 * } else if(context.controllerInput.GetButtonUp(key)){
                 *      m_Graphic.enabled=false;
                 * }
                 */
            }
        }