统一所有平台设置到Input管理
This commit is contained in:
parent
493a5de19f
commit
41b0562f7c
AxibugEmuOnline.Client/Assets/Script/AppMain
AxiInput.Settings
ColecoVisionMultiKeysSetting.csColecoVisionMultiKeysSetting.cs.metaGameBoyColorMultiKeysSetting.csGameBoyColorMultiKeysSetting.cs.metaGameBoyMultiKeysSetting.csGameBoyMultiKeysSetting.cs.metaGameGearMultiKeysSetting.csGameGearMultiKeysSetting.cs.metaMasterSystemMultiKeysSetting.csMasterSystemMultiKeysSetting.cs.metaNESMultiKeysSetting.csNESMultiKeysSetting.cs.metaSC3000MultiKeysSetting.csSC3000MultiKeysSetting.cs.metaSG1000MultiKeysSetting.csSG1000MultiKeysSetting.cs.metaUMAMEMultiKeysSetting.cs
Emulator
EssgeeEmulator/UEssgeeInterface
NesEmulator
Manager
MonoCom
@ -0,0 +1,85 @@
|
|||||||
|
using AxibugEmuOnline.Client.Manager;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Assets.Script.AppMain.AxiInput.Settings
|
||||||
|
{
|
||||||
|
public class ColecoVisionMultiKeysSetting : MultiKeysSettingBase
|
||||||
|
{
|
||||||
|
public ColecoVisionMultiKeysSetting()
|
||||||
|
{
|
||||||
|
controllers = new ColecoVisionSingleKeysSeting[4];
|
||||||
|
for (int i = 0; i < controllers.Length; i++)
|
||||||
|
controllers[i] = new ColecoVisionSingleKeysSeting();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void LoadDefaultSetting()
|
||||||
|
{
|
||||||
|
ClearAll();
|
||||||
|
|
||||||
|
#if UNITY_PSP2 && !UNITY_EDITOR
|
||||||
|
//PSV 摇杆
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.POTION_1, AxiInputEx.ByKeyCode(PSVitaKey.Start));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.POTION_2, AxiInputEx.ByKeyCode(PSVitaKey.Select));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByKeyCode(PSVitaKey.Up));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByKeyCode(PSVitaKey.Down));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByKeyCode(PSVitaKey.Left));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByKeyCode(PSVitaKey.Right));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByKeyCode(PSVitaKey.Cross));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByKeyCode(PSVitaKey.Circle));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_3, AxiInputEx.ByKeyCode(PSVitaKey.Block));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_4, AxiInputEx.ByKeyCode(PSVitaKey.Triangle));
|
||||||
|
//PSV 摇杆
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByAxis(AxiInputAxisType.UP));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByAxis(AxiInputAxisType.DOWN));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByAxis(AxiInputAxisType.LEFT));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByAxis(AxiInputAxisType.RIGHT));
|
||||||
|
controllers[0].ColletAllKey();
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
#region P1
|
||||||
|
//P1 键盘
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_1, AxiInputEx.ByKeyCode(KeyCode.Return));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_2, AxiInputEx.ByKeyCode(KeyCode.RightShift));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByKeyCode(KeyCode.W));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByKeyCode(KeyCode.S));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByKeyCode(KeyCode.A));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByKeyCode(KeyCode.D));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByKeyCode(KeyCode.J));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByKeyCode(KeyCode.K));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_3, AxiInputEx.ByKeyCode(KeyCode.U));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_4, AxiInputEx.ByKeyCode(KeyCode.I));
|
||||||
|
|
||||||
|
//P1 UGUI
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_1, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.POTION_1));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_2, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.POTION_2));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.UP));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.DOWN));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.LEFT));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.RIGHT));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_1));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_2));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_3, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_3));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_4, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_4));
|
||||||
|
|
||||||
|
//P2 键盘
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.OPTION_1, AxiInputEx.ByKeyCode(KeyCode.Keypad0));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.OPTION_2, AxiInputEx.ByKeyCode(KeyCode.Delete));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByKeyCode(KeyCode.UpArrow));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByKeyCode(KeyCode.DownArrow));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByKeyCode(KeyCode.LeftArrow));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByKeyCode(KeyCode.RightArrow));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByKeyCode(KeyCode.Keypad1));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByKeyCode(KeyCode.Keypad2));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.BTN_3, AxiInputEx.ByKeyCode(KeyCode.Keypad3));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.BTN_4, AxiInputEx.ByKeyCode(KeyCode.Keypad4));
|
||||||
|
|
||||||
|
controllers[0].ColletAllKey();
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ColecoVisionSingleKeysSeting : SingleKeySettingBase
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6febcf958b506d74aadb5e7ea35f1a9d
|
@ -0,0 +1,68 @@
|
|||||||
|
using AxibugEmuOnline.Client.Manager;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Assets.Script.AppMain.AxiInput.Settings
|
||||||
|
{
|
||||||
|
public class GameBoyColorMultiKeysSetting : MultiKeysSettingBase
|
||||||
|
{
|
||||||
|
|
||||||
|
public GameBoyColorMultiKeysSetting()
|
||||||
|
{
|
||||||
|
controllers = new GameBoyColorSingleKeysSeting[4];
|
||||||
|
for (int i = 0; i < controllers.Length; i++)
|
||||||
|
controllers[i] = new GameBoyColorSingleKeysSeting();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void LoadDefaultSetting()
|
||||||
|
{
|
||||||
|
ClearAll();
|
||||||
|
|
||||||
|
#if UNITY_PSP2 && !UNITY_EDITOR
|
||||||
|
//PSV 摇杆
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.POTION_1, AxiInputEx.ByKeyCode(PSVitaKey.Start));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.POTION_2, AxiInputEx.ByKeyCode(PSVitaKey.Select));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByKeyCode(PSVitaKey.Up));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByKeyCode(PSVitaKey.Down));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByKeyCode(PSVitaKey.Left));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByKeyCode(PSVitaKey.Right));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByKeyCode(PSVitaKey.Cross));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByKeyCode(PSVitaKey.Circle));
|
||||||
|
//PSV 摇杆
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByAxis(AxiInputAxisType.UP));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByAxis(AxiInputAxisType.DOWN));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByAxis(AxiInputAxisType.LEFT));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByAxis(AxiInputAxisType.RIGHT));
|
||||||
|
controllers[0].ColletAllKey();
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
#region P1
|
||||||
|
//P1 键盘
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_1, AxiInputEx.ByKeyCode(KeyCode.Return));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_2, AxiInputEx.ByKeyCode(KeyCode.RightShift));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByKeyCode(KeyCode.W));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByKeyCode(KeyCode.S));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByKeyCode(KeyCode.A));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByKeyCode(KeyCode.D));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByKeyCode(KeyCode.J));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByKeyCode(KeyCode.K));
|
||||||
|
|
||||||
|
//P1 UGUI
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_1, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.POTION_1));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_2, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.POTION_2));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.UP));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.DOWN));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.LEFT));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.RIGHT));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_1));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_2));
|
||||||
|
|
||||||
|
controllers[0].ColletAllKey();
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GameBoyColorSingleKeysSeting : SingleKeySettingBase
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 98e9f2994f6a07c4fb69339055653348
|
@ -0,0 +1,68 @@
|
|||||||
|
using AxibugEmuOnline.Client.Manager;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Assets.Script.AppMain.AxiInput.Settings
|
||||||
|
{
|
||||||
|
public class GameBoyMultiKeysSetting : MultiKeysSettingBase
|
||||||
|
{
|
||||||
|
|
||||||
|
public GameBoyMultiKeysSetting()
|
||||||
|
{
|
||||||
|
controllers = new GameBoySingleKeysSeting[4];
|
||||||
|
for (int i = 0; i < controllers.Length; i++)
|
||||||
|
controllers[i] = new GameBoySingleKeysSeting();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void LoadDefaultSetting()
|
||||||
|
{
|
||||||
|
ClearAll();
|
||||||
|
|
||||||
|
#if UNITY_PSP2 && !UNITY_EDITOR
|
||||||
|
//PSV 摇杆
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.POTION_1, AxiInputEx.ByKeyCode(PSVitaKey.Start));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.POTION_2, AxiInputEx.ByKeyCode(PSVitaKey.Select));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByKeyCode(PSVitaKey.Up));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByKeyCode(PSVitaKey.Down));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByKeyCode(PSVitaKey.Left));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByKeyCode(PSVitaKey.Right));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByKeyCode(PSVitaKey.Cross));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByKeyCode(PSVitaKey.Circle));
|
||||||
|
//PSV 摇杆
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByAxis(AxiInputAxisType.UP));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByAxis(AxiInputAxisType.DOWN));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByAxis(AxiInputAxisType.LEFT));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByAxis(AxiInputAxisType.RIGHT));
|
||||||
|
controllers[0].ColletAllKey();
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
#region P1
|
||||||
|
//P1 键盘
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_1, AxiInputEx.ByKeyCode(KeyCode.Return));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_2, AxiInputEx.ByKeyCode(KeyCode.RightShift));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByKeyCode(KeyCode.W));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByKeyCode(KeyCode.S));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByKeyCode(KeyCode.A));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByKeyCode(KeyCode.D));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByKeyCode(KeyCode.J));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByKeyCode(KeyCode.K));
|
||||||
|
|
||||||
|
//P1 UGUI
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_1, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.POTION_1));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_2, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.POTION_2));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.UP));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.DOWN));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.LEFT));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.RIGHT));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_1));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_2));
|
||||||
|
|
||||||
|
controllers[0].ColletAllKey();
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GameBoySingleKeysSeting : SingleKeySettingBase
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 42485ea83f647924e9e8a8db04c8b351
|
@ -0,0 +1,85 @@
|
|||||||
|
using AxibugEmuOnline.Client.Manager;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Assets.Script.AppMain.AxiInput.Settings
|
||||||
|
{
|
||||||
|
public class GameGearMultiKeysSetting : MultiKeysSettingBase
|
||||||
|
{
|
||||||
|
public GameGearMultiKeysSetting()
|
||||||
|
{
|
||||||
|
controllers = new GameGearSingleKeysSeting[4];
|
||||||
|
for (int i = 0; i < controllers.Length; i++)
|
||||||
|
controllers[i] = new GameGearSingleKeysSeting();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void LoadDefaultSetting()
|
||||||
|
{
|
||||||
|
ClearAll();
|
||||||
|
|
||||||
|
#if UNITY_PSP2 && !UNITY_EDITOR
|
||||||
|
//PSV 摇杆
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.POTION_1, AxiInputEx.ByKeyCode(PSVitaKey.Start));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.POTION_2, AxiInputEx.ByKeyCode(PSVitaKey.Select));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByKeyCode(PSVitaKey.Up));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByKeyCode(PSVitaKey.Down));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByKeyCode(PSVitaKey.Left));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByKeyCode(PSVitaKey.Right));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByKeyCode(PSVitaKey.Cross));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByKeyCode(PSVitaKey.Circle));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_3, AxiInputEx.ByKeyCode(PSVitaKey.Block));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_4, AxiInputEx.ByKeyCode(PSVitaKey.Triangle));
|
||||||
|
//PSV 摇杆
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByAxis(AxiInputAxisType.UP));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByAxis(AxiInputAxisType.DOWN));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByAxis(AxiInputAxisType.LEFT));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByAxis(AxiInputAxisType.RIGHT));
|
||||||
|
controllers[0].ColletAllKey();
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
#region P1
|
||||||
|
//P1 键盘
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_1, AxiInputEx.ByKeyCode(KeyCode.Return));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_2, AxiInputEx.ByKeyCode(KeyCode.RightShift));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByKeyCode(KeyCode.W));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByKeyCode(KeyCode.S));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByKeyCode(KeyCode.A));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByKeyCode(KeyCode.D));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByKeyCode(KeyCode.J));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByKeyCode(KeyCode.K));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_3, AxiInputEx.ByKeyCode(KeyCode.U));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_4, AxiInputEx.ByKeyCode(KeyCode.I));
|
||||||
|
|
||||||
|
//P1 UGUI
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_1, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.POTION_1));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_2, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.POTION_2));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.UP));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.DOWN));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.LEFT));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.RIGHT));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_1));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_2));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_3, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_3));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_4, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_4));
|
||||||
|
|
||||||
|
//P2 键盘
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.OPTION_1, AxiInputEx.ByKeyCode(KeyCode.Keypad0));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.OPTION_2, AxiInputEx.ByKeyCode(KeyCode.Delete));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByKeyCode(KeyCode.UpArrow));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByKeyCode(KeyCode.DownArrow));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByKeyCode(KeyCode.LeftArrow));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByKeyCode(KeyCode.RightArrow));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByKeyCode(KeyCode.Keypad1));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByKeyCode(KeyCode.Keypad2));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.BTN_3, AxiInputEx.ByKeyCode(KeyCode.Keypad3));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.BTN_4, AxiInputEx.ByKeyCode(KeyCode.Keypad4));
|
||||||
|
|
||||||
|
controllers[0].ColletAllKey();
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GameGearSingleKeysSeting : SingleKeySettingBase
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1f1d4c32b29ac4740945cb36c4442f70
|
@ -0,0 +1,102 @@
|
|||||||
|
using AxibugEmuOnline.Client.Manager;
|
||||||
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Assets.Script.AppMain.AxiInput.Settings
|
||||||
|
{
|
||||||
|
[Flags]
|
||||||
|
public enum EssgeeSingleKey : ushort
|
||||||
|
{
|
||||||
|
NONE = 0,
|
||||||
|
UP = 1,
|
||||||
|
DOWN = 1 << 1,
|
||||||
|
LEFT = 1 << 2,
|
||||||
|
RIGHT = 1 << 3,
|
||||||
|
BTN_1 = 1 << 4,
|
||||||
|
BTN_2 = 1 << 5,
|
||||||
|
BTN_3 = 1 << 6,
|
||||||
|
BTN_4 = 1 << 7,
|
||||||
|
OPTION_1 = 1 << 8,
|
||||||
|
OPTION_2 = 1 << 9,
|
||||||
|
}
|
||||||
|
public class MasterSystemMultiKeysSetting : MultiKeysSettingBase
|
||||||
|
{
|
||||||
|
|
||||||
|
public MasterSystemMultiKeysSetting()
|
||||||
|
{
|
||||||
|
controllers = new MasterSystemSingleKeysSeting[4];
|
||||||
|
for (int i = 0; i < controllers.Length; i++)
|
||||||
|
controllers[i] = new MasterSystemSingleKeysSeting();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void LoadDefaultSetting()
|
||||||
|
{
|
||||||
|
ClearAll();
|
||||||
|
|
||||||
|
#if UNITY_PSP2 && !UNITY_EDITOR
|
||||||
|
//PSV 摇杆
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.POTION_1, AxiInputEx.ByKeyCode(PSVitaKey.Start));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.POTION_2, AxiInputEx.ByKeyCode(PSVitaKey.Select));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByKeyCode(PSVitaKey.Up));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByKeyCode(PSVitaKey.Down));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByKeyCode(PSVitaKey.Left));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByKeyCode(PSVitaKey.Right));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByKeyCode(PSVitaKey.Cross));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByKeyCode(PSVitaKey.Circle));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_3, AxiInputEx.ByKeyCode(PSVitaKey.Block));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_4, AxiInputEx.ByKeyCode(PSVitaKey.Triangle));
|
||||||
|
//PSV 摇杆
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByAxis(AxiInputAxisType.UP));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByAxis(AxiInputAxisType.DOWN));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByAxis(AxiInputAxisType.LEFT));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByAxis(AxiInputAxisType.RIGHT));
|
||||||
|
controllers[0].ColletAllKey();
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
#region P1
|
||||||
|
//P1 键盘
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_1, AxiInputEx.ByKeyCode(KeyCode.Return));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_2, AxiInputEx.ByKeyCode(KeyCode.RightShift));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByKeyCode(KeyCode.W));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByKeyCode(KeyCode.S));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByKeyCode(KeyCode.A));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByKeyCode(KeyCode.D));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByKeyCode(KeyCode.J));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByKeyCode(KeyCode.K));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_3, AxiInputEx.ByKeyCode(KeyCode.U));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_4, AxiInputEx.ByKeyCode(KeyCode.I));
|
||||||
|
|
||||||
|
//P1 UGUI
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_1, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.POTION_1));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_2, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.POTION_2));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.UP));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.DOWN));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.LEFT));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.RIGHT));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_1));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_2));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_3, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_3));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_4, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_4));
|
||||||
|
|
||||||
|
//P2 键盘
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.OPTION_1, AxiInputEx.ByKeyCode(KeyCode.Keypad0));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.OPTION_2, AxiInputEx.ByKeyCode(KeyCode.Delete));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByKeyCode(KeyCode.UpArrow));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByKeyCode(KeyCode.DownArrow));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByKeyCode(KeyCode.LeftArrow));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByKeyCode(KeyCode.RightArrow));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByKeyCode(KeyCode.Keypad1));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByKeyCode(KeyCode.Keypad2));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.BTN_3, AxiInputEx.ByKeyCode(KeyCode.Keypad3));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.BTN_4, AxiInputEx.ByKeyCode(KeyCode.Keypad4));
|
||||||
|
|
||||||
|
controllers[0].ColletAllKey();
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class MasterSystemSingleKeysSeting : SingleKeySettingBase
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e3d5584a82b098141bf0c415938daf84
|
@ -0,0 +1,79 @@
|
|||||||
|
using AxibugEmuOnline.Client.Manager;
|
||||||
|
using UnityEngine;
|
||||||
|
using VirtualNes.Core;
|
||||||
|
|
||||||
|
namespace Assets.Script.AppMain.AxiInput.Settings
|
||||||
|
{
|
||||||
|
public class NESMultiKeysSetting : MultiKeysSettingBase
|
||||||
|
{
|
||||||
|
public NESMultiKeysSetting()
|
||||||
|
{
|
||||||
|
controllers = new NESSingleKeysSeting[4];
|
||||||
|
for (int i = 0; i < controllers.Length; i++)
|
||||||
|
controllers[i] = new NESSingleKeysSeting();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void LoadDefaultSetting()
|
||||||
|
{
|
||||||
|
ClearAll();
|
||||||
|
#if UNITY_PSP2 && !UNITY_EDITOR
|
||||||
|
//PSV 摇杆
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.START, AxiInputEx.ByKeyCode(PSVitaKey.Start));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.SELECT, AxiInputEx.ByKeyCode(PSVitaKey.Select));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.UP, AxiInputEx.ByKeyCode(PSVitaKey.Up));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.DOWN, AxiInputEx.ByKeyCode(PSVitaKey.Down));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.LEFT, AxiInputEx.ByKeyCode(PSVitaKey.Left));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.RIGHT, AxiInputEx.ByKeyCode(PSVitaKey.Right));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.A, AxiInputEx.ByKeyCode(PSVitaKey.Cross));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.B, AxiInputEx.ByKeyCode(PSVitaKey.Circle));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.MIC, AxiInputEx.ByKeyCode(PSVitaKey.Block));
|
||||||
|
//PSV 摇杆
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.UP, AxiInputEx.ByAxis(AxiInputAxisType.UP));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.DOWN, AxiInputEx.ByAxis(AxiInputAxisType.DOWN));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.LEFT, AxiInputEx.ByAxis(AxiInputAxisType.LEFT));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.RIGHT, AxiInputEx.ByAxis(AxiInputAxisType.RIGHT));
|
||||||
|
controllers[0].ColletAllKey();
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
#region P1
|
||||||
|
//P1 键盘
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.START, AxiInputEx.ByKeyCode(KeyCode.Return));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.SELECT, AxiInputEx.ByKeyCode(KeyCode.RightShift));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.UP, AxiInputEx.ByKeyCode(KeyCode.W));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.DOWN, AxiInputEx.ByKeyCode(KeyCode.S));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.LEFT, AxiInputEx.ByKeyCode(KeyCode.A));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.RIGHT, AxiInputEx.ByKeyCode(KeyCode.D));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.A, AxiInputEx.ByKeyCode(KeyCode.K));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.B, AxiInputEx.ByKeyCode(KeyCode.J));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.MIC, AxiInputEx.ByKeyCode(KeyCode.U));
|
||||||
|
|
||||||
|
//P1 UGUI
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.START, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.POTION_1));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.SELECT, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.POTION_2));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.UP, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.UP));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.DOWN, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.DOWN));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.LEFT, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.LEFT));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.RIGHT, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.RIGHT));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.A, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_2));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.B, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_1));
|
||||||
|
controllers[0].SetKey((ulong)EnumButtonType.MIC, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_3));
|
||||||
|
|
||||||
|
//P2 键盘
|
||||||
|
controllers[1].SetKey((ulong)EnumButtonType.START, AxiInputEx.ByKeyCode(KeyCode.Keypad0));
|
||||||
|
controllers[1].SetKey((ulong)EnumButtonType.SELECT, AxiInputEx.ByKeyCode(KeyCode.Delete));
|
||||||
|
controllers[1].SetKey((ulong)EnumButtonType.UP, AxiInputEx.ByKeyCode(KeyCode.UpArrow));
|
||||||
|
controllers[1].SetKey((ulong)EnumButtonType.DOWN, AxiInputEx.ByKeyCode(KeyCode.DownArrow));
|
||||||
|
controllers[1].SetKey((ulong)EnumButtonType.LEFT, AxiInputEx.ByKeyCode(KeyCode.LeftArrow));
|
||||||
|
controllers[1].SetKey((ulong)EnumButtonType.RIGHT, AxiInputEx.ByKeyCode(KeyCode.RightArrow));
|
||||||
|
controllers[1].SetKey((ulong)EnumButtonType.A, AxiInputEx.ByKeyCode(KeyCode.Keypad2));
|
||||||
|
controllers[1].SetKey((ulong)EnumButtonType.B, AxiInputEx.ByKeyCode(KeyCode.Keypad1));
|
||||||
|
controllers[1].SetKey((ulong)EnumButtonType.MIC, AxiInputEx.ByKeyCode(KeyCode.Keypad4));
|
||||||
|
|
||||||
|
controllers[0].ColletAllKey();
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public class NESSingleKeysSeting : SingleKeySettingBase
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6556ff70f8cab73438e5fb7755808a3c
|
@ -0,0 +1,85 @@
|
|||||||
|
using AxibugEmuOnline.Client.Manager;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Assets.Script.AppMain.AxiInput.Settings
|
||||||
|
{
|
||||||
|
public class SC3000MultiKeysSetting : MultiKeysSettingBase
|
||||||
|
{
|
||||||
|
public SC3000MultiKeysSetting()
|
||||||
|
{
|
||||||
|
controllers = new SC3000SingleKeysSeting[4];
|
||||||
|
for (int i = 0; i < controllers.Length; i++)
|
||||||
|
controllers[i] = new SC3000SingleKeysSeting();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void LoadDefaultSetting()
|
||||||
|
{
|
||||||
|
ClearAll();
|
||||||
|
|
||||||
|
#if UNITY_PSP2 && !UNITY_EDITOR
|
||||||
|
//PSV 摇杆
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.POTION_1, AxiInputEx.ByKeyCode(PSVitaKey.Start));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.POTION_2, AxiInputEx.ByKeyCode(PSVitaKey.Select));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByKeyCode(PSVitaKey.Up));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByKeyCode(PSVitaKey.Down));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByKeyCode(PSVitaKey.Left));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByKeyCode(PSVitaKey.Right));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByKeyCode(PSVitaKey.Cross));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByKeyCode(PSVitaKey.Circle));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_3, AxiInputEx.ByKeyCode(PSVitaKey.Block));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_4, AxiInputEx.ByKeyCode(PSVitaKey.Triangle));
|
||||||
|
//PSV 摇杆
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByAxis(AxiInputAxisType.UP));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByAxis(AxiInputAxisType.DOWN));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByAxis(AxiInputAxisType.LEFT));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByAxis(AxiInputAxisType.RIGHT));
|
||||||
|
controllers[0].ColletAllKey();
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
#region P1
|
||||||
|
//P1 键盘
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_1, AxiInputEx.ByKeyCode(KeyCode.Return));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_2, AxiInputEx.ByKeyCode(KeyCode.RightShift));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByKeyCode(KeyCode.W));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByKeyCode(KeyCode.S));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByKeyCode(KeyCode.A));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByKeyCode(KeyCode.D));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByKeyCode(KeyCode.J));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByKeyCode(KeyCode.K));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_3, AxiInputEx.ByKeyCode(KeyCode.U));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_4, AxiInputEx.ByKeyCode(KeyCode.I));
|
||||||
|
|
||||||
|
//P1 UGUI
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_1, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.POTION_1));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_2, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.POTION_2));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.UP));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.DOWN));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.LEFT));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.RIGHT));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_1));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_2));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_3, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_3));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_4, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_4));
|
||||||
|
|
||||||
|
//P2 键盘
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.OPTION_1, AxiInputEx.ByKeyCode(KeyCode.Keypad0));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.OPTION_2, AxiInputEx.ByKeyCode(KeyCode.Delete));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByKeyCode(KeyCode.UpArrow));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByKeyCode(KeyCode.DownArrow));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByKeyCode(KeyCode.LeftArrow));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByKeyCode(KeyCode.RightArrow));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByKeyCode(KeyCode.Keypad1));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByKeyCode(KeyCode.Keypad2));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.BTN_3, AxiInputEx.ByKeyCode(KeyCode.Keypad3));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.BTN_4, AxiInputEx.ByKeyCode(KeyCode.Keypad4));
|
||||||
|
|
||||||
|
controllers[0].ColletAllKey();
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SC3000SingleKeysSeting : SingleKeySettingBase
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: bee2b8a3f5efaec47b9b363eeaa03160
|
@ -0,0 +1,85 @@
|
|||||||
|
using AxibugEmuOnline.Client.Manager;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Assets.Script.AppMain.AxiInput.Settings
|
||||||
|
{
|
||||||
|
public class SG1000MultiKeysSetting : MultiKeysSettingBase
|
||||||
|
{
|
||||||
|
public SG1000MultiKeysSetting()
|
||||||
|
{
|
||||||
|
controllers = new SG1000SingleKeysSeting[4];
|
||||||
|
for (int i = 0; i < controllers.Length; i++)
|
||||||
|
controllers[i] = new SG1000SingleKeysSeting();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void LoadDefaultSetting()
|
||||||
|
{
|
||||||
|
ClearAll();
|
||||||
|
|
||||||
|
#if UNITY_PSP2 && !UNITY_EDITOR
|
||||||
|
//PSV 摇杆
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.POTION_1, AxiInputEx.ByKeyCode(PSVitaKey.Start));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.POTION_2, AxiInputEx.ByKeyCode(PSVitaKey.Select));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByKeyCode(PSVitaKey.Up));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByKeyCode(PSVitaKey.Down));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByKeyCode(PSVitaKey.Left));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByKeyCode(PSVitaKey.Right));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByKeyCode(PSVitaKey.Cross));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByKeyCode(PSVitaKey.Circle));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_3, AxiInputEx.ByKeyCode(PSVitaKey.Block));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_4, AxiInputEx.ByKeyCode(PSVitaKey.Triangle));
|
||||||
|
//PSV 摇杆
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByAxis(AxiInputAxisType.UP));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByAxis(AxiInputAxisType.DOWN));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByAxis(AxiInputAxisType.LEFT));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByAxis(AxiInputAxisType.RIGHT));
|
||||||
|
controllers[0].ColletAllKey();
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
#region P1
|
||||||
|
//P1 键盘
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_1, AxiInputEx.ByKeyCode(KeyCode.Return));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_2, AxiInputEx.ByKeyCode(KeyCode.RightShift));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByKeyCode(KeyCode.W));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByKeyCode(KeyCode.S));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByKeyCode(KeyCode.A));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByKeyCode(KeyCode.D));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByKeyCode(KeyCode.J));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByKeyCode(KeyCode.K));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_3, AxiInputEx.ByKeyCode(KeyCode.U));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_4, AxiInputEx.ByKeyCode(KeyCode.I));
|
||||||
|
|
||||||
|
//P1 UGUI
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_1, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.POTION_1));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.OPTION_2, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.POTION_2));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.UP));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.DOWN));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.LEFT));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.RIGHT));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_1));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_2));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_3, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_3));
|
||||||
|
controllers[0].SetKey((ulong)EssgeeSingleKey.BTN_4, AxiInputEx.ByUGUIBtn(AxiInputUGuiBtnType.BTN_4));
|
||||||
|
|
||||||
|
//P2 键盘
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.OPTION_1, AxiInputEx.ByKeyCode(KeyCode.Keypad0));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.OPTION_2, AxiInputEx.ByKeyCode(KeyCode.Delete));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.UP, AxiInputEx.ByKeyCode(KeyCode.UpArrow));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.DOWN, AxiInputEx.ByKeyCode(KeyCode.DownArrow));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.LEFT, AxiInputEx.ByKeyCode(KeyCode.LeftArrow));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.RIGHT, AxiInputEx.ByKeyCode(KeyCode.RightArrow));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.BTN_1, AxiInputEx.ByKeyCode(KeyCode.Keypad1));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.BTN_2, AxiInputEx.ByKeyCode(KeyCode.Keypad2));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.BTN_3, AxiInputEx.ByKeyCode(KeyCode.Keypad3));
|
||||||
|
controllers[1].SetKey((ulong)EssgeeSingleKey.BTN_4, AxiInputEx.ByKeyCode(KeyCode.Keypad4));
|
||||||
|
|
||||||
|
controllers[0].ColletAllKey();
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SG1000SingleKeysSeting : SingleKeySettingBase
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 771225d8fe367ac42b6b91adf81ca27f
|
@ -22,7 +22,7 @@ namespace Assets.Script.AppMain.AxiInput.Settings
|
|||||||
{
|
{
|
||||||
public UMAMEMultiKeysSetting()
|
public UMAMEMultiKeysSetting()
|
||||||
{
|
{
|
||||||
controllers = new UMAMEKSingleKeysSeting[1];
|
controllers = new UMAMEKSingleKeysSeting[4];
|
||||||
for (int i = 0; i < controllers.Length; i++)
|
for (int i = 0; i < controllers.Length; i++)
|
||||||
controllers[i] = new UMAMEKSingleKeysSeting();
|
controllers[i] = new UMAMEKSingleKeysSeting();
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
|
using Assets.Script.AppMain.AxiInput.Settings;
|
||||||
using AxibugEmuOnline.Client;
|
using AxibugEmuOnline.Client;
|
||||||
using AxibugEmuOnline.Client.ClientCore;
|
using AxibugEmuOnline.Client.ClientCore;
|
||||||
using AxibugEmuOnline.Client.Event;
|
using AxibugEmuOnline.Client.Event;
|
||||||
|
using AxibugEmuOnline.Client.Manager;
|
||||||
using AxiReplay;
|
using AxiReplay;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using static Assets.Script.AppMain.AxiInput.Settings.MasterSystemMultiKeysSetting;
|
||||||
|
|
||||||
public class UEGKeyboard : MonoBehaviour
|
public class UEGKeyboard : MonoBehaviour
|
||||||
{
|
{
|
||||||
@ -539,7 +542,7 @@ public class EssgeeControllerMapper : IControllerSetuper
|
|||||||
}
|
}
|
||||||
public class EssgssSingleController : IController
|
public class EssgssSingleController : IController
|
||||||
{
|
{
|
||||||
public KeyCode UP, DOWN, LEFT, RIGHT, BTN_1, BTN_2, BTN_3, BTN_4, OPTION_1, OPTION_2;
|
//public KeyCode UP, DOWN, LEFT, RIGHT, BTN_1, BTN_2, BTN_3, BTN_4, OPTION_1, OPTION_2;
|
||||||
|
|
||||||
public ulong tg_UP, tg_DOWN, tg_LEFT, tg_RIGHT, tg_BTN_1, tg_BTN_2, tg_BTN_3, tg_BTN_4, tg_OPTION_1, tg_OPTION_2;
|
public ulong tg_UP, tg_DOWN, tg_LEFT, tg_RIGHT, tg_BTN_1, tg_BTN_2, tg_BTN_3, tg_BTN_4, tg_OPTION_1, tg_OPTION_2;
|
||||||
public ulong CurrLocalSingleAllInput { get; private set; }
|
public ulong CurrLocalSingleAllInput { get; private set; }
|
||||||
@ -566,7 +569,7 @@ public class EssgssSingleController : IController
|
|||||||
public int ControllerIndex
|
public int ControllerIndex
|
||||||
{
|
{
|
||||||
get { return mControllerIndex; }
|
get { return mControllerIndex; }
|
||||||
set { mControllerIndex = value; this.LoadControlKeyForConfig(); }
|
set { mControllerIndex = value; /*this.LoadControlKeyForConfig();*/ }
|
||||||
}
|
}
|
||||||
|
|
||||||
public EssgssSingleController(int controllerIndex)
|
public EssgssSingleController(int controllerIndex)
|
||||||
@ -576,33 +579,65 @@ public class EssgssSingleController : IController
|
|||||||
|
|
||||||
public bool AnyButtonDown()
|
public bool AnyButtonDown()
|
||||||
{
|
{
|
||||||
if (Input.GetKeyDown(UP)) return true;
|
//if (Input.GetKeyDown(UP)) return true;
|
||||||
if (Input.GetKeyDown(DOWN)) return true;
|
//if (Input.GetKeyDown(DOWN)) return true;
|
||||||
if (Input.GetKeyDown(LEFT)) return true;
|
//if (Input.GetKeyDown(LEFT)) return true;
|
||||||
if (Input.GetKeyDown(RIGHT)) return true;
|
//if (Input.GetKeyDown(RIGHT)) return true;
|
||||||
if (Input.GetKeyDown(BTN_1)) return true;
|
//if (Input.GetKeyDown(BTN_1)) return true;
|
||||||
if (Input.GetKeyDown(BTN_2)) return true;
|
//if (Input.GetKeyDown(BTN_2)) return true;
|
||||||
if (Input.GetKeyDown(BTN_3)) return true;
|
//if (Input.GetKeyDown(BTN_3)) return true;
|
||||||
if (Input.GetKeyDown(BTN_4)) return true;
|
//if (Input.GetKeyDown(BTN_4)) return true;
|
||||||
if (Input.GetKeyDown(OPTION_1)) return true;
|
//if (Input.GetKeyDown(OPTION_1)) return true;
|
||||||
if (Input.GetKeyDown(OPTION_2)) return true;
|
//if (Input.GetKeyDown(OPTION_2)) return true;
|
||||||
return false;
|
//return false;
|
||||||
|
|
||||||
|
return GetSingleKeys().HadAnyKeyDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SingleKeySettingBase GetSingleKeys()
|
||||||
|
{
|
||||||
|
switch (UEssgee.instance.Platform)
|
||||||
|
{
|
||||||
|
case AxibugProtobuf.RomPlatformType.MasterSystem: return App.input.sms.controllers[mControllerIndex];
|
||||||
|
case AxibugProtobuf.RomPlatformType.GameBoy: return App.input.gb.controllers[mControllerIndex];
|
||||||
|
case AxibugProtobuf.RomPlatformType.GameBoyColor: return App.input.gbc.controllers[mControllerIndex];
|
||||||
|
case AxibugProtobuf.RomPlatformType.ColecoVision: return App.input.cv.controllers[mControllerIndex];
|
||||||
|
case AxibugProtobuf.RomPlatformType.GameGear: return App.input.gg.controllers[mControllerIndex];
|
||||||
|
case AxibugProtobuf.RomPlatformType.Sc3000: return App.input.sc3000.controllers[mControllerIndex];
|
||||||
|
case AxibugProtobuf.RomPlatformType.Sg1000: return App.input.sg1000.controllers[mControllerIndex];
|
||||||
|
default: throw new NotImplementedException("err essgee platform");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public ulong GetSingleAllInput()
|
public ulong GetSingleAllInput()
|
||||||
{
|
{
|
||||||
if (!ConnectSlot.HasValue)
|
if (!ConnectSlot.HasValue)
|
||||||
return 0;
|
return 0;
|
||||||
CurrLocalSingleAllInput = 0;
|
CurrLocalSingleAllInput = 0;
|
||||||
if (Input.GetKey(UP)) CurrLocalSingleAllInput |= (ulong)tg_UP;
|
|
||||||
if (Input.GetKey(DOWN)) CurrLocalSingleAllInput |= (ulong)tg_DOWN;
|
SingleKeySettingBase essgeeKeys = GetSingleKeys();
|
||||||
if (Input.GetKey(LEFT)) CurrLocalSingleAllInput |= (ulong)tg_LEFT;
|
|
||||||
if (Input.GetKey(RIGHT)) CurrLocalSingleAllInput |= (ulong)tg_RIGHT;
|
if (essgeeKeys.GetKey((ulong)EssgeeSingleKey.UP)) CurrLocalSingleAllInput |= (ulong)tg_UP;
|
||||||
if (Input.GetKey(BTN_1)) CurrLocalSingleAllInput |= (ulong)tg_BTN_1;
|
if (essgeeKeys.GetKey((ulong)EssgeeSingleKey.DOWN)) CurrLocalSingleAllInput |= (ulong)tg_DOWN;
|
||||||
if (Input.GetKey(BTN_2)) CurrLocalSingleAllInput |= (ulong)tg_BTN_2;
|
if (essgeeKeys.GetKey((ulong)EssgeeSingleKey.LEFT)) CurrLocalSingleAllInput |= (ulong)tg_LEFT;
|
||||||
if (Input.GetKey(BTN_3)) CurrLocalSingleAllInput |= (ulong)tg_BTN_3;
|
if (essgeeKeys.GetKey((ulong)EssgeeSingleKey.RIGHT)) CurrLocalSingleAllInput |= (ulong)tg_RIGHT;
|
||||||
if (Input.GetKey(BTN_4)) CurrLocalSingleAllInput |= (ulong)tg_BTN_4;
|
if (essgeeKeys.GetKey((ulong)EssgeeSingleKey.BTN_1)) CurrLocalSingleAllInput |= (ulong)tg_BTN_1;
|
||||||
if (Input.GetKey(OPTION_1)) CurrLocalSingleAllInput |= (ulong)tg_OPTION_1;
|
if (essgeeKeys.GetKey((ulong)EssgeeSingleKey.BTN_2)) CurrLocalSingleAllInput |= (ulong)tg_BTN_2;
|
||||||
if (Input.GetKey(OPTION_2)) CurrLocalSingleAllInput |= (ulong)tg_OPTION_1;
|
if (essgeeKeys.GetKey((ulong)EssgeeSingleKey.BTN_3)) CurrLocalSingleAllInput |= (ulong)tg_BTN_3;
|
||||||
|
if (essgeeKeys.GetKey((ulong)EssgeeSingleKey.BTN_4)) CurrLocalSingleAllInput |= (ulong)tg_BTN_4;
|
||||||
|
if (essgeeKeys.GetKey((ulong)EssgeeSingleKey.OPTION_1)) CurrLocalSingleAllInput |= (ulong)tg_OPTION_1;
|
||||||
|
if (essgeeKeys.GetKey((ulong)EssgeeSingleKey.OPTION_2)) CurrLocalSingleAllInput |= (ulong)tg_OPTION_2;
|
||||||
|
|
||||||
|
//if (Input.GetKey(UP)) CurrLocalSingleAllInput |= (ulong)tg_UP;
|
||||||
|
//if (Input.GetKey(DOWN)) CurrLocalSingleAllInput |= (ulong)tg_DOWN;
|
||||||
|
//if (Input.GetKey(LEFT)) CurrLocalSingleAllInput |= (ulong)tg_LEFT;
|
||||||
|
//if (Input.GetKey(RIGHT)) CurrLocalSingleAllInput |= (ulong)tg_RIGHT;
|
||||||
|
//if (Input.GetKey(BTN_1)) CurrLocalSingleAllInput |= (ulong)tg_BTN_1;
|
||||||
|
//if (Input.GetKey(BTN_2)) CurrLocalSingleAllInput |= (ulong)tg_BTN_2;
|
||||||
|
//if (Input.GetKey(BTN_3)) CurrLocalSingleAllInput |= (ulong)tg_BTN_3;
|
||||||
|
//if (Input.GetKey(BTN_4)) CurrLocalSingleAllInput |= (ulong)tg_BTN_4;
|
||||||
|
//if (Input.GetKey(OPTION_1)) CurrLocalSingleAllInput |= (ulong)tg_OPTION_1;
|
||||||
|
//if (Input.GetKey(OPTION_2)) CurrLocalSingleAllInput |= (ulong)tg_OPTION_1;
|
||||||
return CurrLocalSingleAllInput;
|
return CurrLocalSingleAllInput;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -610,41 +645,41 @@ public class EssgssSingleController : IController
|
|||||||
|
|
||||||
public static class EssgssSingleControllerSetter
|
public static class EssgssSingleControllerSetter
|
||||||
{
|
{
|
||||||
public static void LoadControlKeyForConfig(this EssgssSingleController singlecontrol)
|
//public static void LoadControlKeyForConfig(this EssgssSingleController singlecontrol)
|
||||||
{
|
//{
|
||||||
//TODO 等待支持配置,或统一
|
// //TODO µÈ´ýÖ§³ÖÅäÖ㬻òͳһ
|
||||||
switch (singlecontrol.ControllerIndex)
|
// switch (singlecontrol.ControllerIndex)
|
||||||
{
|
// {
|
||||||
case 0:
|
// case 0:
|
||||||
singlecontrol.UP = KeyCode.W;
|
// singlecontrol.UP = KeyCode.W;
|
||||||
singlecontrol.DOWN = KeyCode.S;
|
// singlecontrol.DOWN = KeyCode.S;
|
||||||
singlecontrol.LEFT = KeyCode.A;
|
// singlecontrol.LEFT = KeyCode.A;
|
||||||
singlecontrol.RIGHT = KeyCode.D;
|
// singlecontrol.RIGHT = KeyCode.D;
|
||||||
singlecontrol.BTN_1 = KeyCode.J;
|
// singlecontrol.BTN_1 = KeyCode.J;
|
||||||
singlecontrol.BTN_2 = KeyCode.K;
|
// singlecontrol.BTN_2 = KeyCode.K;
|
||||||
singlecontrol.BTN_3 = KeyCode.L;
|
// singlecontrol.BTN_3 = KeyCode.L;
|
||||||
singlecontrol.BTN_4 = KeyCode.U;
|
// singlecontrol.BTN_4 = KeyCode.U;
|
||||||
singlecontrol.OPTION_1 = KeyCode.Return;
|
// singlecontrol.OPTION_1 = KeyCode.Return;
|
||||||
singlecontrol.OPTION_2 = KeyCode.LeftShift;
|
// singlecontrol.OPTION_2 = KeyCode.LeftShift;
|
||||||
break;
|
// break;
|
||||||
case 1:
|
// case 1:
|
||||||
singlecontrol.UP = KeyCode.UpArrow;
|
// singlecontrol.UP = KeyCode.UpArrow;
|
||||||
singlecontrol.DOWN = KeyCode.DownArrow;
|
// singlecontrol.DOWN = KeyCode.DownArrow;
|
||||||
singlecontrol.LEFT = KeyCode.LeftArrow;
|
// singlecontrol.LEFT = KeyCode.LeftArrow;
|
||||||
singlecontrol.RIGHT = KeyCode.RightArrow;
|
// singlecontrol.RIGHT = KeyCode.RightArrow;
|
||||||
singlecontrol.BTN_1 = KeyCode.Keypad1;
|
// singlecontrol.BTN_1 = KeyCode.Keypad1;
|
||||||
singlecontrol.BTN_2 = KeyCode.Keypad2;
|
// singlecontrol.BTN_2 = KeyCode.Keypad2;
|
||||||
singlecontrol.BTN_3 = KeyCode.Keypad3;
|
// singlecontrol.BTN_3 = KeyCode.Keypad3;
|
||||||
singlecontrol.BTN_4 = KeyCode.Keypad4;
|
// singlecontrol.BTN_4 = KeyCode.Keypad4;
|
||||||
singlecontrol.OPTION_1 = KeyCode.Keypad0;
|
// singlecontrol.OPTION_1 = KeyCode.Keypad0;
|
||||||
singlecontrol.OPTION_2 = KeyCode.KeypadPeriod;
|
// singlecontrol.OPTION_2 = KeyCode.KeypadPeriod;
|
||||||
break;
|
// break;
|
||||||
case 2:
|
// case 2:
|
||||||
break;
|
// break;
|
||||||
case 3:
|
// case 3:
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
public static void ResetTargetMotionKey(this EssgssSingleController singlecontrol)
|
public static void ResetTargetMotionKey(this EssgssSingleController singlecontrol)
|
||||||
{
|
{
|
||||||
if (!singlecontrol.ConnectSlot.HasValue)
|
if (!singlecontrol.ConnectSlot.HasValue)
|
||||||
@ -688,7 +723,6 @@ public static class EssgssSingleControllerSetter
|
|||||||
singlecontrol.tg_OPTION_1 = EssgeeUnityKey.P2_POTION_1;
|
singlecontrol.tg_OPTION_1 = EssgeeUnityKey.P2_POTION_1;
|
||||||
singlecontrol.tg_OPTION_2 = EssgeeUnityKey.P2_POTION_2;
|
singlecontrol.tg_OPTION_2 = EssgeeUnityKey.P2_POTION_2;
|
||||||
break;
|
break;
|
||||||
//后续修改后 支持P3 P4
|
|
||||||
case 2:
|
case 2:
|
||||||
singlecontrol.tg_UP = EssgeeUnityKey.P3_UP;
|
singlecontrol.tg_UP = EssgeeUnityKey.P3_UP;
|
||||||
singlecontrol.tg_DOWN = EssgeeUnityKey.P3_DOWN;
|
singlecontrol.tg_DOWN = EssgeeUnityKey.P3_DOWN;
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
//using MAME.Core;
|
|
||||||
//using UnityEngine;
|
|
||||||
|
|
||||||
//public class UEGMouse : MonoBehaviour, IMouse
|
|
||||||
//{
|
|
||||||
// static int mX, mY;
|
|
||||||
// public byte[] buttons = new byte[2];
|
|
||||||
// void Update()
|
|
||||||
// {
|
|
||||||
// mX = (int)Input.mousePosition.x;
|
|
||||||
// mY = (int)Input.mousePosition.y;
|
|
||||||
// buttons[0] = Input.GetMouseButton(0) ? (byte)1 : (byte)0;
|
|
||||||
// buttons[1] = Input.GetMouseButton(1) ? (byte)1 : (byte)0;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// public void MouseXY(out int X, out int Y, out byte[] MouseButtons)
|
|
||||||
// {
|
|
||||||
// X = mX;
|
|
||||||
// Y = mY * -1;
|
|
||||||
// MouseButtons = buttons;
|
|
||||||
// }
|
|
||||||
|
|
||||||
//}
|
|
@ -1,2 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 5000dd7c855d83549b136afe42b2bb47
|
|
@ -1,4 +1,5 @@
|
|||||||
using UnityEngine;
|
using AxibugEmuOnline.Client.ClientCore;
|
||||||
|
using UnityEngine;
|
||||||
using VirtualNes.Core;
|
using VirtualNes.Core;
|
||||||
|
|
||||||
namespace AxibugEmuOnline.Client
|
namespace AxibugEmuOnline.Client
|
||||||
@ -13,13 +14,25 @@ namespace AxibugEmuOnline.Client
|
|||||||
private SoundBuffer _buffer = new SoundBuffer(4096);
|
private SoundBuffer _buffer = new SoundBuffer(4096);
|
||||||
public void Start()
|
public void Start()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
//// 获取当前音频配置
|
||||||
|
//AudioConfiguration config = AudioSettings.GetConfiguration();
|
||||||
|
//// 设置目标音频配置
|
||||||
|
//config.sampleRate = 44100; // 采样率
|
||||||
|
//config.numRealVoices = 32; // 设置最大音频源数量(可选)
|
||||||
|
//config.numVirtualVoices = 512; // 设置虚拟音频源数量(可选)
|
||||||
|
//config.dspBufferSize = 1024; // 设置 DSP 缓冲区大小(可选)
|
||||||
|
//config.speakerMode = AudioSpeakerMode.Stereo; // 设置为立体声(2 声道)
|
||||||
|
App.audioMgr.SetAudioConfig(new AudioConfiguration());
|
||||||
|
|
||||||
//TODO 采样率需要更准确,而且和clip并没有关系
|
//TODO 采样率需要更准确,而且和clip并没有关系
|
||||||
var dummy = AudioClip.Create("dummy", 1, 1, AudioSettings.outputSampleRate, false);
|
//var dummy = AudioClip.Create("dummy", 1, 1, AudioSettings.outputSampleRate, false);
|
||||||
dummy.SetData(new float[] { 1 }, 0);
|
//dummy.SetData(new float[] { 1 }, 0);
|
||||||
m_as.clip = dummy; //just to let unity play the audiosource
|
//m_as.clip = dummy; //just to let unity play the audiosource
|
||||||
m_as.loop = true;
|
m_as.loop = true;
|
||||||
m_as.spatialBlend = 1;
|
m_as.spatialBlend = 1;
|
||||||
m_as.Play();
|
m_as.Play();
|
||||||
|
|
||||||
}
|
}
|
||||||
public void GetAudioParams(out int frequency, out int channels)
|
public void GetAudioParams(out int frequency, out int channels)
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
using AxibugEmuOnline.Client.Common;
|
using AxibugEmuOnline.Client.ClientCore;
|
||||||
|
using AxibugEmuOnline.Client.Common;
|
||||||
using AxibugEmuOnline.Client.Event;
|
using AxibugEmuOnline.Client.Event;
|
||||||
|
using NUnit.Framework.Internal;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@ -133,59 +135,70 @@ namespace AxibugEmuOnline.Client
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public uint? ConnectSlot { get; set; }
|
public uint? ConnectSlot { get; set; }
|
||||||
|
|
||||||
public Button UP { get; }
|
//public Button UP { get; }
|
||||||
public Button DOWN { get; }
|
//public Button DOWN { get; }
|
||||||
public Button LEFT { get; }
|
//public Button LEFT { get; }
|
||||||
public Button RIGHT { get; }
|
//public Button RIGHT { get; }
|
||||||
public Button A { get; }
|
//public Button A { get; }
|
||||||
public Button B { get; }
|
//public Button B { get; }
|
||||||
public Button SELECT { get; }
|
//public Button SELECT { get; }
|
||||||
public Button START { get; }
|
//public Button START { get; }
|
||||||
public Button MIC { get; }
|
//public Button MIC { get; }
|
||||||
|
|
||||||
public Controller(int controllerIndex)
|
public Controller(int controllerIndex)
|
||||||
{
|
{
|
||||||
ControllerIndex = controllerIndex;
|
ControllerIndex = controllerIndex;
|
||||||
UP = new Button(this, EnumButtonType.UP);
|
//UP = new Button(this, EnumButtonType.UP);
|
||||||
DOWN = new Button(this, EnumButtonType.DOWN);
|
//DOWN = new Button(this, EnumButtonType.DOWN);
|
||||||
LEFT = new Button(this, EnumButtonType.LEFT);
|
//LEFT = new Button(this, EnumButtonType.LEFT);
|
||||||
RIGHT = new Button(this, EnumButtonType.RIGHT);
|
//RIGHT = new Button(this, EnumButtonType.RIGHT);
|
||||||
A = new Button(this, EnumButtonType.A);
|
//A = new Button(this, EnumButtonType.A);
|
||||||
B = new Button(this, EnumButtonType.B);
|
//B = new Button(this, EnumButtonType.B);
|
||||||
SELECT = new Button(this, EnumButtonType.SELECT);
|
//SELECT = new Button(this, EnumButtonType.SELECT);
|
||||||
START = new Button(this, EnumButtonType.START);
|
//START = new Button(this, EnumButtonType.START);
|
||||||
MIC = new Button(this, EnumButtonType.MIC);
|
//MIC = new Button(this, EnumButtonType.MIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
public EnumButtonType GetButtons()
|
public EnumButtonType GetButtons()
|
||||||
{
|
{
|
||||||
EnumButtonType res = 0;
|
EnumButtonType res = 0;
|
||||||
|
|
||||||
res |= UP.SampleKey();
|
if(App.input.nes.controllers[ControllerIndex].GetKey((ulong)EnumButtonType.UP)) res |= EnumButtonType.UP;
|
||||||
res |= DOWN.SampleKey();
|
if(App.input.nes.controllers[ControllerIndex].GetKey((ulong)EnumButtonType.DOWN)) res |= EnumButtonType.DOWN;
|
||||||
res |= LEFT.SampleKey();
|
if(App.input.nes.controllers[ControllerIndex].GetKey((ulong)EnumButtonType.LEFT)) res |= EnumButtonType.LEFT;
|
||||||
res |= RIGHT.SampleKey();
|
if(App.input.nes.controllers[ControllerIndex].GetKey((ulong)EnumButtonType.RIGHT)) res |= EnumButtonType.RIGHT;
|
||||||
res |= A.SampleKey();
|
if(App.input.nes.controllers[ControllerIndex].GetKey((ulong)EnumButtonType.A)) res |= EnumButtonType.A;
|
||||||
res |= B.SampleKey();
|
if(App.input.nes.controllers[ControllerIndex].GetKey((ulong)EnumButtonType.B)) res |= EnumButtonType.B;
|
||||||
res |= SELECT.SampleKey();
|
if(App.input.nes.controllers[ControllerIndex].GetKey((ulong)EnumButtonType.SELECT)) res |= EnumButtonType.SELECT;
|
||||||
res |= START.SampleKey();
|
if(App.input.nes.controllers[ControllerIndex].GetKey((ulong)EnumButtonType.START)) res |= EnumButtonType.START;
|
||||||
res |= MIC.SampleKey();
|
if(App.input.nes.controllers[ControllerIndex].GetKey((ulong)EnumButtonType.MIC)) res |= EnumButtonType.MIC;
|
||||||
|
|
||||||
|
//res |= UP.SampleKey();
|
||||||
|
//res |= DOWN.SampleKey();
|
||||||
|
//res |= LEFT.SampleKey();
|
||||||
|
//res |= RIGHT.SampleKey();
|
||||||
|
//res |= A.SampleKey();
|
||||||
|
//res |= B.SampleKey();
|
||||||
|
//res |= SELECT.SampleKey();
|
||||||
|
//res |= START.SampleKey();
|
||||||
|
//res |= MIC.SampleKey();
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool AnyButtonDown()
|
public bool AnyButtonDown()
|
||||||
{
|
{
|
||||||
return
|
return App.input.nes.controllers[ControllerIndex].HadAnyKeyDown();
|
||||||
UP.IsDown ||
|
//return
|
||||||
DOWN.IsDown ||
|
// UP.IsDown ||
|
||||||
LEFT.IsDown ||
|
// DOWN.IsDown ||
|
||||||
RIGHT.IsDown ||
|
// LEFT.IsDown ||
|
||||||
A.IsDown ||
|
// RIGHT.IsDown ||
|
||||||
B.IsDown ||
|
// A.IsDown ||
|
||||||
SELECT.IsDown ||
|
// B.IsDown ||
|
||||||
START.IsDown ||
|
// SELECT.IsDown ||
|
||||||
MIC.IsDown;
|
// START.IsDown ||
|
||||||
|
// MIC.IsDown;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static KeyListener GetKey(int controllerInput, EnumButtonType nesConBtnType)
|
public static KeyListener GetKey(int controllerInput, EnumButtonType nesConBtnType)
|
||||||
@ -211,47 +224,47 @@ namespace AxibugEmuOnline.Client
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// NES控制器按键类
|
///// NES控制器按键类
|
||||||
/// </summary>
|
///// </summary>
|
||||||
public class Button
|
//public class Button
|
||||||
{
|
//{
|
||||||
/// <summary> 所属控制器 </summary>
|
// /// <summary> 所属控制器 </summary>
|
||||||
readonly Controller m_hostController;
|
// readonly Controller m_hostController;
|
||||||
|
|
||||||
/// <summary> 按键 </summary>
|
// /// <summary> 按键 </summary>
|
||||||
readonly EnumButtonType m_buttonType;
|
// readonly EnumButtonType m_buttonType;
|
||||||
|
|
||||||
/// <summary> 按键监听器 </summary>
|
// /// <summary> 按键监听器 </summary>
|
||||||
KeyListener m_keyListener;
|
// KeyListener m_keyListener;
|
||||||
|
|
||||||
/// <summary> 指示按钮是否正在按下状态 </summary>
|
// /// <summary> 指示按钮是否正在按下状态 </summary>
|
||||||
public bool IsPressing => m_keyListener.IsPressing();
|
// public bool IsPressing => m_keyListener.IsPressing();
|
||||||
/// <summary> 指示按钮是否被按下 </summary>
|
// /// <summary> 指示按钮是否被按下 </summary>
|
||||||
public bool IsDown => m_keyListener.IsDown();
|
// public bool IsDown => m_keyListener.IsDown();
|
||||||
|
|
||||||
public Button(Controller controller, EnumButtonType buttonType)
|
// public Button(Controller controller, EnumButtonType buttonType)
|
||||||
{
|
// {
|
||||||
m_hostController = controller;
|
// m_hostController = controller;
|
||||||
m_buttonType = buttonType;
|
// m_buttonType = buttonType;
|
||||||
|
|
||||||
CreateListener();
|
// CreateListener();
|
||||||
}
|
// }
|
||||||
|
|
||||||
/// <summary>
|
// /// <summary>
|
||||||
/// 采集按钮按下状态
|
// /// 采集按钮按下状态
|
||||||
/// </summary>
|
// /// </summary>
|
||||||
/// <returns></returns>
|
// /// <returns></returns>
|
||||||
public EnumButtonType SampleKey()
|
// public EnumButtonType SampleKey()
|
||||||
{
|
// {
|
||||||
return IsPressing ? m_buttonType : 0;
|
// return IsPressing ? m_buttonType : 0;
|
||||||
}
|
// }
|
||||||
|
|
||||||
private void CreateListener()
|
// private void CreateListener()
|
||||||
{
|
// {
|
||||||
m_keyListener = Controller.GetKey(m_hostController.ControllerIndex, m_buttonType);
|
// m_keyListener = Controller.GetKey(m_hostController.ControllerIndex, m_buttonType);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
//low C# readonly
|
//low C# readonly
|
||||||
//public readonly struct KeyListener
|
//public readonly struct KeyListener
|
||||||
|
|
||||||
|
@ -14,11 +14,27 @@ namespace AxibugEmuOnline.Client.Manager
|
|||||||
public XMBMultiKeysSetting xmb;
|
public XMBMultiKeysSetting xmb;
|
||||||
public GamingMultiKeysSetting gaming;
|
public GamingMultiKeysSetting gaming;
|
||||||
public UMAMEMultiKeysSetting mame;
|
public UMAMEMultiKeysSetting mame;
|
||||||
|
public NESMultiKeysSetting nes;
|
||||||
|
public MasterSystemMultiKeysSetting sms;
|
||||||
|
public ColecoVisionMultiKeysSetting cv;
|
||||||
|
public GameBoyColorMultiKeysSetting gbc;
|
||||||
|
public GameBoyMultiKeysSetting gb;
|
||||||
|
public GameGearMultiKeysSetting gg;
|
||||||
|
public SC3000MultiKeysSetting sc3000;
|
||||||
|
public SG1000MultiKeysSetting sg1000;
|
||||||
public AppInput()
|
public AppInput()
|
||||||
{
|
{
|
||||||
xmb = new XMBMultiKeysSetting();
|
xmb = new XMBMultiKeysSetting();
|
||||||
gaming = new GamingMultiKeysSetting();
|
gaming = new GamingMultiKeysSetting();
|
||||||
mame = new UMAMEMultiKeysSetting();
|
mame = new UMAMEMultiKeysSetting();
|
||||||
|
nes = new NESMultiKeysSetting();
|
||||||
|
sms = new MasterSystemMultiKeysSetting();
|
||||||
|
cv = new ColecoVisionMultiKeysSetting();
|
||||||
|
gbc = new GameBoyColorMultiKeysSetting();
|
||||||
|
gb = new GameBoyMultiKeysSetting();
|
||||||
|
gg = new GameGearMultiKeysSetting();
|
||||||
|
sc3000 = new SC3000MultiKeysSetting();
|
||||||
|
sg1000 = new SG1000MultiKeysSetting();
|
||||||
LoadDefaultSetting();
|
LoadDefaultSetting();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,6 +43,14 @@ namespace AxibugEmuOnline.Client.Manager
|
|||||||
xmb.LoadDefaultSetting();
|
xmb.LoadDefaultSetting();
|
||||||
gaming.LoadDefaultSetting();
|
gaming.LoadDefaultSetting();
|
||||||
mame.LoadDefaultSetting();
|
mame.LoadDefaultSetting();
|
||||||
|
nes.LoadDefaultSetting();
|
||||||
|
sms.LoadDefaultSetting();
|
||||||
|
cv.LoadDefaultSetting();
|
||||||
|
gbc.LoadDefaultSetting();
|
||||||
|
gb.LoadDefaultSetting();
|
||||||
|
gg.LoadDefaultSetting();
|
||||||
|
sc3000.LoadDefaultSetting();
|
||||||
|
sg1000.LoadDefaultSetting();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using static UnityEditor.PlayerSettings;
|
|
||||||
|
|
||||||
namespace AxibugEmuOnline.Client
|
namespace AxibugEmuOnline.Client
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user