forked from sin365/AxibugEmuOnline
PSVitaKey
This commit is contained in:
parent
23db5358fb
commit
def785b3a3
32
AxibugEmuOnline.Client/Assets/Script/Common/PSVitaKey.cs
Normal file
32
AxibugEmuOnline.Client/Assets/Script/Common/PSVitaKey.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace AxibugEmuOnline.Client.Common
|
||||
{
|
||||
public static class PSVitaKey
|
||||
{
|
||||
/// <summary>
|
||||
/// ×
|
||||
/// </summary>
|
||||
public static KeyCode Cross => KeyCode.Joystick1Button0;
|
||||
/// <summary>
|
||||
/// ⭕
|
||||
/// </summary>
|
||||
public static KeyCode Circle => KeyCode.Joystick1Button1;
|
||||
/// <summary>
|
||||
/// □
|
||||
/// </summary>
|
||||
public static KeyCode Block => KeyCode.Joystick1Button2;
|
||||
/// <summary>
|
||||
/// 🔺
|
||||
/// </summary>
|
||||
public static KeyCode Triangle => KeyCode.Joystick1Button3;
|
||||
public static KeyCode L => KeyCode.Joystick1Button4;
|
||||
public static KeyCode R => KeyCode.Joystick1Button5;
|
||||
public static KeyCode Select => KeyCode.Joystick1Button6;
|
||||
public static KeyCode Start => KeyCode.Joystick1Button7;
|
||||
public static KeyCode Up => KeyCode.Joystick1Button8;
|
||||
public static KeyCode Right => KeyCode.Joystick1Button9;
|
||||
public static KeyCode Down => KeyCode.Joystick1Button10;
|
||||
public static KeyCode Left => KeyCode.Joystick1Button11
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 71934f91b4b95184a966ac2b316bfddf
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -18,22 +18,38 @@ namespace AxibugEmuOnline.Client
|
||||
{
|
||||
Instance = this;
|
||||
|
||||
m_keyMapper.Add(KeyCode.A, EnumCommand.SelectItemLeft);
|
||||
m_keyMapper.Add(KeyCode.D, EnumCommand.SelectItemRight);
|
||||
m_keyMapper.Add(KeyCode.W, EnumCommand.SelectItemUp);
|
||||
m_keyMapper.Add(KeyCode.S, EnumCommand.SelectItemDown);
|
||||
m_keyMapper.Add(KeyCode.K, EnumCommand.Enter);
|
||||
m_keyMapper.Add(KeyCode.L, EnumCommand.Back);
|
||||
m_keyMapper.Add(KeyCode.I, EnumCommand.OptionMenu);
|
||||
m_keyMapper[KeyCode.A] = EnumCommand.SelectItemLeft;
|
||||
m_keyMapper[KeyCode.D] = EnumCommand.SelectItemRight;
|
||||
m_keyMapper[KeyCode.W] = EnumCommand.SelectItemUp;
|
||||
m_keyMapper[KeyCode.S] = EnumCommand.SelectItemDown;
|
||||
m_keyMapper[KeyCode.K] = EnumCommand.Enter;
|
||||
m_keyMapper[KeyCode.L] = EnumCommand.Back;
|
||||
m_keyMapper[KeyCode.I] = EnumCommand.OptionMenu;
|
||||
m_keyMapper[KeyCode.LeftArrow] = EnumCommand.SelectItemLeft;
|
||||
m_keyMapper[KeyCode.RightArrow] = EnumCommand.SelectItemRight;
|
||||
m_keyMapper[KeyCode.UpArrow] = EnumCommand.SelectItemUp;
|
||||
m_keyMapper[KeyCode.DownArrow] = EnumCommand.SelectItemDown;
|
||||
m_keyMapper[KeyCode.Return] = EnumCommand.Enter;
|
||||
m_keyMapper[KeyCode.Escape] = EnumCommand.Back;
|
||||
m_keyMapper[KeyCode.RightShift] = EnumCommand.OptionMenu;
|
||||
m_keyMapper[KeyCode.LeftShift] = EnumCommand.OptionMenu;
|
||||
|
||||
m_keyMapper.Add(KeyCode.LeftArrow, EnumCommand.SelectItemLeft);
|
||||
m_keyMapper.Add(KeyCode.RightArrow, EnumCommand.SelectItemRight);
|
||||
m_keyMapper.Add(KeyCode.UpArrow, EnumCommand.SelectItemUp);
|
||||
m_keyMapper.Add(KeyCode.DownArrow, EnumCommand.SelectItemDown);
|
||||
m_keyMapper.Add(KeyCode.Return, EnumCommand.Enter);
|
||||
m_keyMapper.Add(KeyCode.Escape, EnumCommand.Back);
|
||||
m_keyMapper.Add(KeyCode.RightShift, EnumCommand.OptionMenu);
|
||||
m_keyMapper.Add(KeyCode.LeftShift, EnumCommand.OptionMenu);
|
||||
|
||||
if (Application.platform == RuntimePlatform.PSP2)
|
||||
{
|
||||
m_keyMapper[Common.PSVitaKey.Left] = EnumCommand.SelectItemLeft;
|
||||
m_keyMapper[Common.PSVitaKey.Right] = EnumCommand.SelectItemRight;
|
||||
m_keyMapper[Common.PSVitaKey.Up] = EnumCommand.SelectItemUp;
|
||||
m_keyMapper[Common.PSVitaKey.Down] = EnumCommand.SelectItemDown;
|
||||
m_keyMapper[Common.PSVitaKey.Circle] = EnumCommand.Enter;
|
||||
m_keyMapper[Common.PSVitaKey.Cross] = EnumCommand.Back;
|
||||
m_keyMapper[Common.PSVitaKey.Triangle] = EnumCommand.OptionMenu;
|
||||
}
|
||||
//ÊÖ±ú
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
|
Loading…
Reference in New Issue
Block a user