Beispiel #1
0
        public override void Setup()
        {
            base.Setup();
            const string kLayout = @"
                {
                    ""name"" : ""TestDevice"",
                    ""extend"" : ""HID"",
                    ""controls"" : [
                        { ""name"" : ""button"", ""layout"" : ""Axis"" }
                    ]
                }";

            InputSystem.RegisterLayout(kLayout);
            m_Device  = InputSystem.AddDevice("TestDevice");
            m_Control = (InputControl <float>)m_Device["button"];
            m_Action  = new InputAction("action", InputActionType.Value, "/TestDevice/button", null, null, "Axis");
            m_Action.Enable();
            m_Adaptor = new FloatInputActionAdaptor();
        }
Beispiel #2
0
 public override void TearDown()
 {
     base.TearDown();
     m_Adaptor = null;
 }