feat(): 完成将Manager从Gameplay转移到Core,实现循环次数持久化,实现设置面板
This commit is contained in:
@@ -145,6 +145,15 @@ namespace Script.Gameplay.Input
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
},
|
||||
{
|
||||
""name"": ""Setting"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""0e4b0859-2f31-413a-a14c-87333e2f63b4"",
|
||||
""expectedControlType"": """",
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
}
|
||||
],
|
||||
""bindings"": [
|
||||
@@ -334,6 +343,17 @@ namespace Script.Gameplay.Input
|
||||
""action"": ""Read"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""257ce27b-6b51-4716-8b94-abbe05c2eaf9"",
|
||||
""path"": ""<Keyboard>/escape"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""Setting"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -355,6 +375,7 @@ namespace Script.Gameplay.Input
|
||||
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);
|
||||
m_Player_Setting = m_Player.FindAction("Setting", throwIfNotFound: true);
|
||||
}
|
||||
|
||||
~@PlayerInputActions()
|
||||
@@ -434,6 +455,7 @@ namespace Script.Gameplay.Input
|
||||
private readonly InputAction m_Player_CutLine;
|
||||
private readonly InputAction m_Player_ShowNextDialogue;
|
||||
private readonly InputAction m_Player_Read;
|
||||
private readonly InputAction m_Player_Setting;
|
||||
public struct PlayerActions
|
||||
{
|
||||
private @PlayerInputActions m_Wrapper;
|
||||
@@ -451,6 +473,7 @@ namespace Script.Gameplay.Input
|
||||
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 InputAction @Setting => m_Wrapper.m_Player_Setting;
|
||||
public InputActionMap Get() { return m_Wrapper.m_Player; }
|
||||
public void Enable() { Get().Enable(); }
|
||||
public void Disable() { Get().Disable(); }
|
||||
@@ -499,6 +522,9 @@ namespace Script.Gameplay.Input
|
||||
@Read.started += instance.OnRead;
|
||||
@Read.performed += instance.OnRead;
|
||||
@Read.canceled += instance.OnRead;
|
||||
@Setting.started += instance.OnSetting;
|
||||
@Setting.performed += instance.OnSetting;
|
||||
@Setting.canceled += instance.OnSetting;
|
||||
}
|
||||
|
||||
private void UnregisterCallbacks(IPlayerActions instance)
|
||||
@@ -542,6 +568,9 @@ namespace Script.Gameplay.Input
|
||||
@Read.started -= instance.OnRead;
|
||||
@Read.performed -= instance.OnRead;
|
||||
@Read.canceled -= instance.OnRead;
|
||||
@Setting.started -= instance.OnSetting;
|
||||
@Setting.performed -= instance.OnSetting;
|
||||
@Setting.canceled -= instance.OnSetting;
|
||||
}
|
||||
|
||||
public void RemoveCallbacks(IPlayerActions instance)
|
||||
@@ -574,6 +603,7 @@ namespace Script.Gameplay.Input
|
||||
void OnCutLine(InputAction.CallbackContext context);
|
||||
void OnShowNextDialogue(InputAction.CallbackContext context);
|
||||
void OnRead(InputAction.CallbackContext context);
|
||||
void OnSetting(InputAction.CallbackContext context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user