feat(CutLine): 实现切除连接线的逻辑
This commit is contained in:
@@ -118,6 +118,15 @@ namespace Script.Gameplay.Input
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
},
|
||||
{
|
||||
""name"": ""CutLine"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""bf20e378-b5e0-4749-90b7-fc2aa09bd5c9"",
|
||||
""expectedControlType"": """",
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
}
|
||||
],
|
||||
""bindings"": [
|
||||
@@ -274,6 +283,17 @@ namespace Script.Gameplay.Input
|
||||
""action"": ""SetInput"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""53d79cef-a048-4b85-8078-03fcfeb79182"",
|
||||
""path"": ""<Keyboard>/x"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""CutLine"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -292,6 +312,7 @@ namespace Script.Gameplay.Input
|
||||
m_Player_Connect = m_Player.FindAction("Connect", throwIfNotFound: true);
|
||||
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);
|
||||
}
|
||||
|
||||
~@PlayerInputActions()
|
||||
@@ -368,6 +389,7 @@ namespace Script.Gameplay.Input
|
||||
private readonly InputAction m_Player_Connect;
|
||||
private readonly InputAction m_Player_SetOutput;
|
||||
private readonly InputAction m_Player_SetInput;
|
||||
private readonly InputAction m_Player_CutLine;
|
||||
public struct PlayerActions
|
||||
{
|
||||
private @PlayerInputActions m_Wrapper;
|
||||
@@ -382,6 +404,7 @@ namespace Script.Gameplay.Input
|
||||
public InputAction @Connect => m_Wrapper.m_Player_Connect;
|
||||
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 InputActionMap Get() { return m_Wrapper.m_Player; }
|
||||
public void Enable() { Get().Enable(); }
|
||||
public void Disable() { Get().Disable(); }
|
||||
@@ -421,6 +444,9 @@ namespace Script.Gameplay.Input
|
||||
@SetInput.started += instance.OnSetInput;
|
||||
@SetInput.performed += instance.OnSetInput;
|
||||
@SetInput.canceled += instance.OnSetInput;
|
||||
@CutLine.started += instance.OnCutLine;
|
||||
@CutLine.performed += instance.OnCutLine;
|
||||
@CutLine.canceled += instance.OnCutLine;
|
||||
}
|
||||
|
||||
private void UnregisterCallbacks(IPlayerActions instance)
|
||||
@@ -455,6 +481,9 @@ namespace Script.Gameplay.Input
|
||||
@SetInput.started -= instance.OnSetInput;
|
||||
@SetInput.performed -= instance.OnSetInput;
|
||||
@SetInput.canceled -= instance.OnSetInput;
|
||||
@CutLine.started -= instance.OnCutLine;
|
||||
@CutLine.performed -= instance.OnCutLine;
|
||||
@CutLine.canceled -= instance.OnCutLine;
|
||||
}
|
||||
|
||||
public void RemoveCallbacks(IPlayerActions instance)
|
||||
@@ -484,6 +513,7 @@ namespace Script.Gameplay.Input
|
||||
void OnConnect(InputAction.CallbackContext context);
|
||||
void OnSetOutput(InputAction.CallbackContext context);
|
||||
void OnSetInput(InputAction.CallbackContext context);
|
||||
void OnCutLine(InputAction.CallbackContext context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user