Exemplo n.º 1
0
 /// <summary>
 /// Register a VirtualButton when the VirtualButton is enabled.
 /// </summary>
 /// <param name="name">The name of the VirtualButton.</param>
 /// <param name="virtualButton">A reference to the VirtualButton.</param>
 public void RegisterVirtualButton(string name, UnityVirtualButton virtualButton)
 {
     if (!m_UseMobileInput)
     {
         return;
     }
     (m_Input as UnityMobileInput).AddVirtualButton(name, virtualButton);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Binds a new VirtualButton with the specified values.
        /// </summary>
        /// <param name="virtualButtonName">The VirtualButton name.</param>
        /// <param name="virtualButtonValue">A reference to the VirtualButton.</param>
        public void AddVirtualButton(string virtualButtonName, UnityVirtualButton virtualButtonValue)
        {
            if (m_VirtualButtonMap == null)
            {
                m_VirtualButtonMap = new Dictionary <string, UnityVirtualButton>();
            }

            m_VirtualButtonMap.Add(virtualButtonName, virtualButtonValue);
        }