コード例 #1
0
        public InputDevice(string name)
        {
            Name = name;
            Meta = "";
            Guid = Guid.NewGuid();

            LastChangeTick = 0;

            const int numInputControlTypes = (int)InputControlType.Count + 1;

            Controls = new InputControl[numInputControlTypes];

            LeftStickX = new OneAxisInputControl();
            LeftStickY = new OneAxisInputControl();
            LeftStick  = new TwoAxisInputControl();

            RightStickX = new OneAxisInputControl();
            RightStickY = new OneAxisInputControl();
            RightStick  = new TwoAxisInputControl();

            DPadX = new OneAxisInputControl();
            DPadY = new OneAxisInputControl();
            DPad  = new TwoAxisInputControl();

            Command = AddControl(InputControlType.Command, "Command");
//            AddControl(InputControlType.Action1, "Action1");
        }
コード例 #2
0
 public TwoAxisInputControl()
 {
     Left  = new OneAxisInputControl();
     Right = new OneAxisInputControl();
     Up    = new OneAxisInputControl();
     Down  = new OneAxisInputControl();
 }