Ejemplo n.º 1
0
        public void RegisterVirtualButton(VirtualButton button)
        {
            // check if already have a buttin with that name and log an error if we do
            if (m_VirtualButtons.ContainsKey(button.name))
            {
                Debug.LogError("There is already a virtual button named " + button.name + " registered.");
            }
            else
            {
                // add any new buttons
                m_VirtualButtons.Add(button.name, button);

                // if we dont want to match to the input manager then always use a virtual axis
                if (!button.matchWithInputManager)
                {
                    m_AlwaysUseVirtual.Add(button.name);
                }

                button.virtualInput = this;
            }
        }
Ejemplo n.º 2
0
 void Start()
 {
     CreateVirtualAxes();
     m_MouseButton = new VirtualButton(buttonName);
     InputManager.RegisterVirtualButton(m_MouseButton);
 }
Ejemplo n.º 3
0
 public static void RegisterVirtualButton(VirtualButton button)
 {
     activeInput.RegisterVirtualButton(button);
 }