コード例 #1
0
        public InputManager(RabbitPlatform instance, bool defaults)
        {
            this.game  = instance;
            actionKeys = new Dictionary <ActionKeyType, ActionKey>();

            if (defaults)
            {
                actionKeys.Add(ActionKeyType.GO_LEFT, new KeyboardActionKey(Keys.Left));
                actionKeys.Add(ActionKeyType.GO_RIGHT, new KeyboardActionKey(Keys.Right));
                actionKeys.Add(ActionKeyType.JUMP, new KeyboardActionKey(Keys.LeftControl));
                actionKeys.Add(ActionKeyType.RUN, new KeyboardActionKey(Keys.LeftShift));
            }

            keyboardManager = new KeyboardManager();
            mouseManager    = new MouseManager();
        }
コード例 #2
0
 public MouseEvent(MouseManager mouseManager, MouseButton button, int wheelDelta = 0)
 {
     this.mouseManager = mouseManager;
     this.button       = button;
     this.wheelDelta   = wheelDelta;
 }