Ejemplo n.º 1
0
        public void RegisterVirtualButton(CrossPlatformInputManager.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);
                }
            }
        }
Ejemplo n.º 2
0
        public void RegisterVirtualAxis(CrossPlatformInputManager.VirtualAxis axis)
        {
            // check if we already have an axis with that name and log and error if we do
            if (m_VirtualAxes.ContainsKey(axis.name))
            {
                Debug.LogError("There is already a virtual axis named " + axis.name + " registered.");
            }
            else
            {
                // add any new axes
                m_VirtualAxes.Add(axis.name, axis);

                // if we dont want to match with the input manager setting then revert to always using virtual
                if (!axis.matchWithInputManager)
                {
                    m_AlwaysUseVirtual.Add(axis.name);
                }
            }
        }
Ejemplo n.º 3
0
 public void SetAxisNegativeState(string name)
 {
     CrossPlatformInputManager.SetAxisNegative(name);
 }
Ejemplo n.º 4
0
 public void SetAxisNeutralState(string name)
 {
     CrossPlatformInputManager.SetAxisZero(name);
 }
Ejemplo n.º 5
0
 public void SetUpState(string name)
 {
     CrossPlatformInputManager.SetButtonUp(name);
 }
Ejemplo n.º 6
0
 public void SetDownState(string name)
 {
     CrossPlatformInputManager.SetButtonDown(name);
 }