feat(Dialogue): 实现基本的对话系统
This commit is contained in:
@@ -127,6 +127,15 @@ namespace Script.Gameplay.Input
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
},
|
||||
{
|
||||
""name"": ""ShowNextDialogue"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""a8bce90a-e5e4-45fe-8189-cfb48debddf5"",
|
||||
""expectedControlType"": """",
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
}
|
||||
],
|
||||
""bindings"": [
|
||||
@@ -294,6 +303,17 @@ namespace Script.Gameplay.Input
|
||||
""action"": ""CutLine"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""86dadc63-5591-4a7b-8fec-e5cfdb31b787"",
|
||||
""path"": ""<Mouse>/leftButton"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""ShowNextDialogue"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -313,6 +333,7 @@ namespace Script.Gameplay.Input
|
||||
m_Player_SetOutput = m_Player.FindAction("SetOutput", throwIfNotFound: true);
|
||||
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);
|
||||
}
|
||||
|
||||
~@PlayerInputActions()
|
||||
@@ -390,6 +411,7 @@ namespace Script.Gameplay.Input
|
||||
private readonly InputAction m_Player_SetOutput;
|
||||
private readonly InputAction m_Player_SetInput;
|
||||
private readonly InputAction m_Player_CutLine;
|
||||
private readonly InputAction m_Player_ShowNextDialogue;
|
||||
public struct PlayerActions
|
||||
{
|
||||
private @PlayerInputActions m_Wrapper;
|
||||
@@ -405,6 +427,7 @@ namespace Script.Gameplay.Input
|
||||
public InputAction @SetOutput => m_Wrapper.m_Player_SetOutput;
|
||||
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 InputActionMap Get() { return m_Wrapper.m_Player; }
|
||||
public void Enable() { Get().Enable(); }
|
||||
public void Disable() { Get().Disable(); }
|
||||
@@ -447,6 +470,9 @@ namespace Script.Gameplay.Input
|
||||
@CutLine.started += instance.OnCutLine;
|
||||
@CutLine.performed += instance.OnCutLine;
|
||||
@CutLine.canceled += instance.OnCutLine;
|
||||
@ShowNextDialogue.started += instance.OnShowNextDialogue;
|
||||
@ShowNextDialogue.performed += instance.OnShowNextDialogue;
|
||||
@ShowNextDialogue.canceled += instance.OnShowNextDialogue;
|
||||
}
|
||||
|
||||
private void UnregisterCallbacks(IPlayerActions instance)
|
||||
@@ -484,6 +510,9 @@ namespace Script.Gameplay.Input
|
||||
@CutLine.started -= instance.OnCutLine;
|
||||
@CutLine.performed -= instance.OnCutLine;
|
||||
@CutLine.canceled -= instance.OnCutLine;
|
||||
@ShowNextDialogue.started -= instance.OnShowNextDialogue;
|
||||
@ShowNextDialogue.performed -= instance.OnShowNextDialogue;
|
||||
@ShowNextDialogue.canceled -= instance.OnShowNextDialogue;
|
||||
}
|
||||
|
||||
public void RemoveCallbacks(IPlayerActions instance)
|
||||
@@ -514,6 +543,7 @@ namespace Script.Gameplay.Input
|
||||
void OnSetOutput(InputAction.CallbackContext context);
|
||||
void OnSetInput(InputAction.CallbackContext context);
|
||||
void OnCutLine(InputAction.CallbackContext context);
|
||||
void OnShowNextDialogue(InputAction.CallbackContext context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user