コード例 #1
0
 /// <summary>
 /// Returns normalized value for the specified input axis.
 /// </summary>
 /// <param name="axis">Virtual axis identifier.</param>
 /// <param name="deviceIdx">Optional device index in case multiple input devices are available.</param>
 /// <returns>Axis value, normally in [-1.0, 1.0] range, but can be outside the range for devices with unbound axes
 ///          (for example mouse).</returns>
 public static float GetAxisValue(VirtualAxis axis, int deviceIdx = 0)
 {
     return(Internal_GetAxisValue(ref axis, deviceIdx));
 }
コード例 #2
0
ファイル: SceneCamera.cs プロジェクト: Ruu/BansheeEngine
        private void OnReset()
        {
            camera = SceneObject.GetComponent<Camera>();

            moveForwardBtn = new VirtualButton(MoveForwardBinding);
            moveLeftBtn = new VirtualButton(MoveLeftBinding);
            moveRightBtn = new VirtualButton(MoveRightBinding);
            moveBackwardBtn = new VirtualButton(MoveBackBinding);
            moveUpBtn = new VirtualButton(MoveUpBinding);
            moveDownBtn = new VirtualButton(MoveDownBinding);
            fastMoveBtn = new VirtualButton(FastMoveBinding);
            activeBtn = new VirtualButton(RotateBinding);
            panBtn = new VirtualButton(PanBinding);
            horizontalAxis = new VirtualAxis(HorizontalAxisBinding);
            verticalAxis = new VirtualAxis(VerticalAxisBinding);
            scrollAxis = new VirtualAxis(ScrollAxisBinding);
        }
コード例 #3
0
 private static extern float Internal_GetAxisValue(ref VirtualAxis button, int deviceIdx);