Esempio n. 1
0
        public bool bPressed(EInstrumentPart part, EPad pad)
        {
            if (part != EInstrumentPart.UNKNOWN)
            {
                CConfigIni.CKeyAssign.STKEYASSIGN[] stkeyassignArray = this.rConfigIni.KeyAssign[(int)part][(int)pad];
                for (int i = 0; i < stkeyassignArray.Length; i++)
                {
                    switch (stkeyassignArray[i].InputDevice)
                    {
                    case EInputDevice.Keyboard:
                        if (!this.rInput管理.Keyboard.bKeyPressed(stkeyassignArray[i].Code))
                        {
                            break;
                        }

                        this.stDetectedDevice.Keyboard = true;
                        return(true);

                    case EInputDevice.MIDI入力:
                    {
                        IInputDevice device2 = this.rInput管理.MidiIn(stkeyassignArray[i].ID);
                        if ((device2 == null) || !device2.bKeyPressed(stkeyassignArray[i].Code))
                        {
                            break;
                        }

                        this.stDetectedDevice.MIDIIN = true;
                        return(true);
                    }

                    case EInputDevice.Joypad:
                    {
                        if (!this.rConfigIni.dicJoystick.ContainsKey(stkeyassignArray[i].ID))
                        {
                            break;
                        }

                        IInputDevice device = this.rInput管理.Joystick(stkeyassignArray[i].ID);
                        if ((device == null) || !device.bKeyPressed(stkeyassignArray[i].Code))
                        {
                            break;
                        }

                        this.stDetectedDevice.Joypad = true;
                        return(true);
                    }

                    case EInputDevice.Mouse:
                        if (!this.rInput管理.Mouse.bKeyPressed(stkeyassignArray[i].Code))
                        {
                            break;
                        }

                        this.stDetectedDevice.Mouse = true;
                        return(true);
                    }
                }
            }
            return(false);
        }
Esempio n. 2
0
 public bool b押されているGB(EPad pad)
 {
     if (!this.bPressing(EInstrumentPart.GUITAR, pad))
     {
         return(this.bPressing(EInstrumentPart.BASS, pad));
     }
     return(true);
 }
Esempio n. 3
0
 public bool bPressedDGB(EPad pad)
 {
     if (!this.bPressed(EInstrumentPart.DRUMS, pad) && !this.bPressed(EInstrumentPart.GUITAR, pad))
     {
         return(this.bPressed(EInstrumentPart.BASS, pad));
     }
     return(true);
 }
Esempio n. 4
0
        public bool bPressed(EPad pad)
        {
            CConfigIni.CKeyAssign.STKEYASSIGN[] stkeyassignArray = this.rConfigIni.KeyAssign[(int)pad];
            for (int i = 0; i < stkeyassignArray.Length; i++)
            {
                switch (stkeyassignArray[i].入力デバイス)
                {
                case EInputDevice.KeyBoard:
                    if (!this.rInputManager.Keyboard.bIsKeyPressed(stkeyassignArray[i].Code))
                    {
                        break;
                    }

                    this.stDetectedDevices.Keyboard = true;
                    return(true);

                case EInputDevice.MIDIInput:
                {
                    IInputDevice device2 = this.rInputManager.MidiIn(stkeyassignArray[i].ID);
                    if ((device2 == null) || !device2.bIsKeyPressed(stkeyassignArray[i].Code))
                    {
                        break;
                    }

                    this.stDetectedDevices.MIDIIN = true;
                    return(true);
                }

                case EInputDevice.Joypad:
                {
                    if (!this.rConfigIni.dicJoystick.ContainsKey(stkeyassignArray[i].ID))
                    {
                        break;
                    }

                    IInputDevice device = this.rInputManager.Joystick(stkeyassignArray[i].ID);
                    if ((device == null) || !device.bIsKeyPressed(stkeyassignArray[i].Code))
                    {
                        break;
                    }

                    this.stDetectedDevices.Joypad = true;
                    return(true);
                }

                case EInputDevice.Mouse:
                    if (!this.rInputManager.Mouse.bIsKeyPressed(stkeyassignArray[i].Code))
                    {
                        break;
                    }

                    this.stDetectedDevices.Mouse = true;
                    return(true);
                }
            }

            return(false);
        }
Esempio n. 5
0
        // メソッド

        public List <STInputEvent> GetEvents(EPad pad)
        {
            CConfigIni.CKeyAssign.STKEYASSIGN[] stkeyassignArray = this.rConfigIni.KeyAssign[(int)pad];
            List <STInputEvent> list = new List <STInputEvent>();

            // すべての入力デバイスについて…
            foreach (IInputDevice device in this.rInputManager.listInputDevices)
            {
                if ((device.listInputEvents != null) && (device.listInputEvents.Count != 0))
                {
                    foreach (STInputEvent event2 in device.listInputEvents)
                    {
                        for (int i = 0; i < stkeyassignArray.Length; i++)
                        {
                            switch (stkeyassignArray[i].入力デバイス)
                            {
                            case EInputDevice.KeyBoard:
                                if ((device.eInputDeviceType == EInputDeviceType.Keyboard) && (event2.nKey == stkeyassignArray[i].Code))
                                {
                                    list.Add(event2);
                                    this.stDetectedDevices.Keyboard = true;
                                }
                                break;

                            case EInputDevice.MIDIInput:
                                if (((device.eInputDeviceType == EInputDeviceType.MidiIn) && (device.ID == stkeyassignArray[i].ID)) && (event2.nKey == stkeyassignArray[i].Code))
                                {
                                    list.Add(event2);
                                    this.stDetectedDevices.MIDIIN = true;
                                }
                                break;

                            case EInputDevice.Joypad:
                                if (((device.eInputDeviceType == EInputDeviceType.Joystick) && (device.ID == stkeyassignArray[i].ID)) && (event2.nKey == stkeyassignArray[i].Code))
                                {
                                    list.Add(event2);
                                    this.stDetectedDevices.Joypad = true;
                                }
                                break;

                            case EInputDevice.Mouse:
                                if ((device.eInputDeviceType == EInputDeviceType.Mouse) && (event2.nKey == stkeyassignArray[i].Code))
                                {
                                    list.Add(event2);
                                    this.stDetectedDevices.Mouse = true;
                                }
                                break;
                            }
                        }
                    }
                    continue;
                }
            }
            return(list);
        }