Example #1
0
        public CameraController(IState inputState, Graphics.Camera camera)
        {
            if (inputState == null)
            {
                throw new ArgumentNullException("inputState");
            }

            if (camera == null)
            {
                throw new ArgumentNullException("camera");
            }

            this.inputState = inputState;
            inputMoveForward = inputState.Register("moveForward");
            inputMoveBackward = inputState.Register("moveBackward");
            inputStrafeLeft = inputState.Register("strafeLeft");
            inputStrafeRight = inputState.Register("strafeRight");
            this.camera = camera;
            mouseSensitivity = 500.0f;
        }