feat(Read): 将阅读修改为R键,并添加阅读提示
This commit is contained in:
@@ -136,6 +136,15 @@ namespace Script.Gameplay.Input
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
},
|
||||
{
|
||||
""name"": ""Read"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""fa5376df-3b5c-46fe-a07b-6078433ec971"",
|
||||
""expectedControlType"": """",
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
}
|
||||
],
|
||||
""bindings"": [
|
||||
@@ -314,6 +323,17 @@ namespace Script.Gameplay.Input
|
||||
""action"": ""ShowNextDialogue"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""15819353-a9d0-43b3-92b2-c89ec003b41c"",
|
||||
""path"": ""<Keyboard>/r"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""Read"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -334,6 +354,7 @@ namespace Script.Gameplay.Input
|
||||
m_Player_SetInput = m_Player.FindAction("SetInput", throwIfNotFound: true);
|
||||
m_Player_CutLine = m_Player.FindAction("CutLine", throwIfNotFound: true);
|
||||
m_Player_ShowNextDialogue = m_Player.FindAction("ShowNextDialogue", throwIfNotFound: true);
|
||||
m_Player_Read = m_Player.FindAction("Read", throwIfNotFound: true);
|
||||
}
|
||||
|
||||
~@PlayerInputActions()
|
||||
@@ -412,6 +433,7 @@ namespace Script.Gameplay.Input
|
||||
private readonly InputAction m_Player_SetInput;
|
||||
private readonly InputAction m_Player_CutLine;
|
||||
private readonly InputAction m_Player_ShowNextDialogue;
|
||||
private readonly InputAction m_Player_Read;
|
||||
public struct PlayerActions
|
||||
{
|
||||
private @PlayerInputActions m_Wrapper;
|
||||
@@ -428,6 +450,7 @@ namespace Script.Gameplay.Input
|
||||
public InputAction @SetInput => m_Wrapper.m_Player_SetInput;
|
||||
public InputAction @CutLine => m_Wrapper.m_Player_CutLine;
|
||||
public InputAction @ShowNextDialogue => m_Wrapper.m_Player_ShowNextDialogue;
|
||||
public InputAction @Read => m_Wrapper.m_Player_Read;
|
||||
public InputActionMap Get() { return m_Wrapper.m_Player; }
|
||||
public void Enable() { Get().Enable(); }
|
||||
public void Disable() { Get().Disable(); }
|
||||
@@ -473,6 +496,9 @@ namespace Script.Gameplay.Input
|
||||
@ShowNextDialogue.started += instance.OnShowNextDialogue;
|
||||
@ShowNextDialogue.performed += instance.OnShowNextDialogue;
|
||||
@ShowNextDialogue.canceled += instance.OnShowNextDialogue;
|
||||
@Read.started += instance.OnRead;
|
||||
@Read.performed += instance.OnRead;
|
||||
@Read.canceled += instance.OnRead;
|
||||
}
|
||||
|
||||
private void UnregisterCallbacks(IPlayerActions instance)
|
||||
@@ -513,6 +539,9 @@ namespace Script.Gameplay.Input
|
||||
@ShowNextDialogue.started -= instance.OnShowNextDialogue;
|
||||
@ShowNextDialogue.performed -= instance.OnShowNextDialogue;
|
||||
@ShowNextDialogue.canceled -= instance.OnShowNextDialogue;
|
||||
@Read.started -= instance.OnRead;
|
||||
@Read.performed -= instance.OnRead;
|
||||
@Read.canceled -= instance.OnRead;
|
||||
}
|
||||
|
||||
public void RemoveCallbacks(IPlayerActions instance)
|
||||
@@ -544,6 +573,7 @@ namespace Script.Gameplay.Input
|
||||
void OnSetInput(InputAction.CallbackContext context);
|
||||
void OnCutLine(InputAction.CallbackContext context);
|
||||
void OnShowNextDialogue(InputAction.CallbackContext context);
|
||||
void OnRead(InputAction.CallbackContext context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user