Inheritance: System.Disposable, InputI
Example #1
0
        public Mouse(DisposableI parent)
            : base(parent)
        {
            input = parent.FindParentOrSelfWithException<Input>();
            input.UpdateEventCallback += UpdateEvent;
            input.UpdateCallback += Update;

            Left = new Button();
            Middle = new Button();
            Right = new Button();
        }
Example #2
0
        public Keyboard(DisposableI parent)
            : base(parent)
        {
            input = parent.FindParentOrSelfWithException<Input>();
            input.UpdateEventCallback += UpdateEvent;
            input.UpdateCallback += Update;

            keys = new bool[256];
            buttons = new Button[256];
            for (int i = 0; i != 256; ++i)
            {
                buttons[i] = new Button();
            }
        }