コード例 #1
0
ファイル: BGJoystick.cs プロジェクト: KENEW/NyanNyanHunters
        void CreateVirtualAxes()
        {
            // set axes to use
            m_UseX = (axesToUse == AxisOption.Both || axesToUse == AxisOption.OnlyHorizontal);
            m_UseY = (axesToUse == AxisOption.Both || axesToUse == AxisOption.OnlyVertical);

            // create new axes based on axes to use
            if (m_UseX)
            {
                m_HorizontalVirtualAxis = new BGCrossPlatformInputManager.VirtualAxis(horizontalAxisName);
                BGCrossPlatformInputManager.RegisterVirtualAxis(m_HorizontalVirtualAxis);
            }
            if (m_UseY)
            {
                m_VerticalVirtualAxis = new BGCrossPlatformInputManager.VirtualAxis(verticalAxisName);
                BGCrossPlatformInputManager.RegisterVirtualAxis(m_VerticalVirtualAxis);
            }
        }
コード例 #2
0
 private void AddAxes(string name)
 {
     // we have not registered this button yet so add it, happens in the constructor
     BGCrossPlatformInputManager.RegisterVirtualAxis(new BGCrossPlatformInputManager.VirtualAxis(name));
 }