1.基本完成了投掷框架
2.明天写画抛物线
This commit is contained in:
parent
40fabeca5e
commit
fb66487ff4
@ -185,6 +185,175 @@ public class @Player : IInputActionCollection, IDisposable
|
|||||||
""isPartOfComposite"": false
|
""isPartOfComposite"": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
""name"": ""NullMap"",
|
||||||
|
""id"": ""c4624120-51ed-40d4-859d-23407e1af549"",
|
||||||
|
""actions"": [
|
||||||
|
{
|
||||||
|
""name"": ""New action"",
|
||||||
|
""type"": ""Button"",
|
||||||
|
""id"": ""beabb251-6f14-495d-9364-88119e0f9bf0"",
|
||||||
|
""expectedControlType"": ""Button"",
|
||||||
|
""processors"": """",
|
||||||
|
""interactions"": """"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
""bindings"": [
|
||||||
|
{
|
||||||
|
""name"": """",
|
||||||
|
""id"": ""ae26865a-51e7-44ff-aea5-7c92da228cef"",
|
||||||
|
""path"": """",
|
||||||
|
""interactions"": """",
|
||||||
|
""processors"": """",
|
||||||
|
""groups"": """",
|
||||||
|
""action"": ""New action"",
|
||||||
|
""isComposite"": false,
|
||||||
|
""isPartOfComposite"": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
""name"": ""PlayerInThrowing"",
|
||||||
|
""id"": ""ce68185c-0387-41f3-b3e6-fa39ba2919e5"",
|
||||||
|
""actions"": [
|
||||||
|
{
|
||||||
|
""name"": ""Quit"",
|
||||||
|
""type"": ""Button"",
|
||||||
|
""id"": ""078b3370-2cb6-4574-9156-0146ae814573"",
|
||||||
|
""expectedControlType"": ""Button"",
|
||||||
|
""processors"": """",
|
||||||
|
""interactions"": """"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
""name"": ""Throw"",
|
||||||
|
""type"": ""Button"",
|
||||||
|
""id"": ""6bab4454-55d6-409c-9736-d1640a407628"",
|
||||||
|
""expectedControlType"": ""Button"",
|
||||||
|
""processors"": """",
|
||||||
|
""interactions"": """"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
""name"": ""AdjustTheAngle"",
|
||||||
|
""type"": ""Value"",
|
||||||
|
""id"": ""fddd4068-5ae8-4c1a-8498-4c8c30327f57"",
|
||||||
|
""expectedControlType"": ""Axis"",
|
||||||
|
""processors"": """",
|
||||||
|
""interactions"": """"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
""bindings"": [
|
||||||
|
{
|
||||||
|
""name"": """",
|
||||||
|
""id"": ""4c3ccd32-0010-4273-951a-4280201b6418"",
|
||||||
|
""path"": ""<Gamepad>/buttonEast"",
|
||||||
|
""interactions"": """",
|
||||||
|
""processors"": """",
|
||||||
|
""groups"": ""Player"",
|
||||||
|
""action"": ""Quit"",
|
||||||
|
""isComposite"": false,
|
||||||
|
""isPartOfComposite"": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
""name"": """",
|
||||||
|
""id"": ""e28bf435-0e2c-4e22-887e-66dc54eb99c2"",
|
||||||
|
""path"": ""<Keyboard>/k"",
|
||||||
|
""interactions"": """",
|
||||||
|
""processors"": """",
|
||||||
|
""groups"": ""Player"",
|
||||||
|
""action"": ""Quit"",
|
||||||
|
""isComposite"": false,
|
||||||
|
""isPartOfComposite"": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
""name"": """",
|
||||||
|
""id"": ""72d81a4a-c61f-4b02-8495-19d0fe279d6c"",
|
||||||
|
""path"": ""<Keyboard>/shift"",
|
||||||
|
""interactions"": """",
|
||||||
|
""processors"": """",
|
||||||
|
""groups"": ""Player"",
|
||||||
|
""action"": ""Throw"",
|
||||||
|
""isComposite"": false,
|
||||||
|
""isPartOfComposite"": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
""name"": """",
|
||||||
|
""id"": ""42108f89-0858-4a1e-8ca9-f92d541b2328"",
|
||||||
|
""path"": ""<Gamepad>/rightTrigger"",
|
||||||
|
""interactions"": """",
|
||||||
|
""processors"": """",
|
||||||
|
""groups"": ""Player"",
|
||||||
|
""action"": ""Throw"",
|
||||||
|
""isComposite"": false,
|
||||||
|
""isPartOfComposite"": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
""name"": ""1D Axis"",
|
||||||
|
""id"": ""ea410c6c-a556-403c-8a68-002f5b70e7c0"",
|
||||||
|
""path"": ""1DAxis"",
|
||||||
|
""interactions"": """",
|
||||||
|
""processors"": """",
|
||||||
|
""groups"": """",
|
||||||
|
""action"": ""AdjustTheAngle"",
|
||||||
|
""isComposite"": true,
|
||||||
|
""isPartOfComposite"": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
""name"": ""negative"",
|
||||||
|
""id"": ""96e2ca69-cab5-4c52-8bf7-8e3e98800a2f"",
|
||||||
|
""path"": ""<Keyboard>/s"",
|
||||||
|
""interactions"": """",
|
||||||
|
""processors"": """",
|
||||||
|
""groups"": ""Player"",
|
||||||
|
""action"": ""AdjustTheAngle"",
|
||||||
|
""isComposite"": false,
|
||||||
|
""isPartOfComposite"": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
""name"": ""positive"",
|
||||||
|
""id"": ""c016c203-a320-411b-9ec1-2dadd19d628a"",
|
||||||
|
""path"": ""<Keyboard>/w"",
|
||||||
|
""interactions"": """",
|
||||||
|
""processors"": """",
|
||||||
|
""groups"": ""Player"",
|
||||||
|
""action"": ""AdjustTheAngle"",
|
||||||
|
""isComposite"": false,
|
||||||
|
""isPartOfComposite"": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
""name"": ""1D Axis"",
|
||||||
|
""id"": ""85e86d8c-ef51-4e91-9833-416f07830ef7"",
|
||||||
|
""path"": ""1DAxis"",
|
||||||
|
""interactions"": """",
|
||||||
|
""processors"": """",
|
||||||
|
""groups"": """",
|
||||||
|
""action"": ""AdjustTheAngle"",
|
||||||
|
""isComposite"": true,
|
||||||
|
""isPartOfComposite"": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
""name"": ""negative"",
|
||||||
|
""id"": ""dbde76be-6fa4-4ffa-b56c-889e98ce208a"",
|
||||||
|
""path"": ""<Gamepad>/leftStick/down"",
|
||||||
|
""interactions"": """",
|
||||||
|
""processors"": """",
|
||||||
|
""groups"": ""Player"",
|
||||||
|
""action"": ""AdjustTheAngle"",
|
||||||
|
""isComposite"": false,
|
||||||
|
""isPartOfComposite"": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
""name"": ""positive"",
|
||||||
|
""id"": ""b0d81269-947f-44bf-9dc6-4f11746d6eb2"",
|
||||||
|
""path"": ""<Gamepad>/leftStick/up"",
|
||||||
|
""interactions"": """",
|
||||||
|
""processors"": """",
|
||||||
|
""groups"": ""Player"",
|
||||||
|
""action"": ""AdjustTheAngle"",
|
||||||
|
""isComposite"": false,
|
||||||
|
""isPartOfComposite"": true
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
""controlSchemes"": [
|
""controlSchemes"": [
|
||||||
@ -212,6 +381,14 @@ public class @Player : IInputActionCollection, IDisposable
|
|||||||
m_PlayerNormal_Run = m_PlayerNormal.FindAction("Run", throwIfNotFound: true);
|
m_PlayerNormal_Run = m_PlayerNormal.FindAction("Run", throwIfNotFound: true);
|
||||||
m_PlayerNormal_Interaction = m_PlayerNormal.FindAction("Interaction", throwIfNotFound: true);
|
m_PlayerNormal_Interaction = m_PlayerNormal.FindAction("Interaction", throwIfNotFound: true);
|
||||||
m_PlayerNormal_Coding = m_PlayerNormal.FindAction("Coding", throwIfNotFound: true);
|
m_PlayerNormal_Coding = m_PlayerNormal.FindAction("Coding", throwIfNotFound: true);
|
||||||
|
// NullMap
|
||||||
|
m_NullMap = asset.FindActionMap("NullMap", throwIfNotFound: true);
|
||||||
|
m_NullMap_Newaction = m_NullMap.FindAction("New action", throwIfNotFound: true);
|
||||||
|
// PlayerInThrowing
|
||||||
|
m_PlayerInThrowing = asset.FindActionMap("PlayerInThrowing", throwIfNotFound: true);
|
||||||
|
m_PlayerInThrowing_Quit = m_PlayerInThrowing.FindAction("Quit", throwIfNotFound: true);
|
||||||
|
m_PlayerInThrowing_Throw = m_PlayerInThrowing.FindAction("Throw", throwIfNotFound: true);
|
||||||
|
m_PlayerInThrowing_AdjustTheAngle = m_PlayerInThrowing.FindAction("AdjustTheAngle", throwIfNotFound: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
@ -314,6 +491,88 @@ public class @Player : IInputActionCollection, IDisposable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
public PlayerNormalActions @PlayerNormal => new PlayerNormalActions(this);
|
public PlayerNormalActions @PlayerNormal => new PlayerNormalActions(this);
|
||||||
|
|
||||||
|
// NullMap
|
||||||
|
private readonly InputActionMap m_NullMap;
|
||||||
|
private INullMapActions m_NullMapActionsCallbackInterface;
|
||||||
|
private readonly InputAction m_NullMap_Newaction;
|
||||||
|
public struct NullMapActions
|
||||||
|
{
|
||||||
|
private @Player m_Wrapper;
|
||||||
|
public NullMapActions(@Player wrapper) { m_Wrapper = wrapper; }
|
||||||
|
public InputAction @Newaction => m_Wrapper.m_NullMap_Newaction;
|
||||||
|
public InputActionMap Get() { return m_Wrapper.m_NullMap; }
|
||||||
|
public void Enable() { Get().Enable(); }
|
||||||
|
public void Disable() { Get().Disable(); }
|
||||||
|
public bool enabled => Get().enabled;
|
||||||
|
public static implicit operator InputActionMap(NullMapActions set) { return set.Get(); }
|
||||||
|
public void SetCallbacks(INullMapActions instance)
|
||||||
|
{
|
||||||
|
if (m_Wrapper.m_NullMapActionsCallbackInterface != null)
|
||||||
|
{
|
||||||
|
@Newaction.started -= m_Wrapper.m_NullMapActionsCallbackInterface.OnNewaction;
|
||||||
|
@Newaction.performed -= m_Wrapper.m_NullMapActionsCallbackInterface.OnNewaction;
|
||||||
|
@Newaction.canceled -= m_Wrapper.m_NullMapActionsCallbackInterface.OnNewaction;
|
||||||
|
}
|
||||||
|
m_Wrapper.m_NullMapActionsCallbackInterface = instance;
|
||||||
|
if (instance != null)
|
||||||
|
{
|
||||||
|
@Newaction.started += instance.OnNewaction;
|
||||||
|
@Newaction.performed += instance.OnNewaction;
|
||||||
|
@Newaction.canceled += instance.OnNewaction;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public NullMapActions @NullMap => new NullMapActions(this);
|
||||||
|
|
||||||
|
// PlayerInThrowing
|
||||||
|
private readonly InputActionMap m_PlayerInThrowing;
|
||||||
|
private IPlayerInThrowingActions m_PlayerInThrowingActionsCallbackInterface;
|
||||||
|
private readonly InputAction m_PlayerInThrowing_Quit;
|
||||||
|
private readonly InputAction m_PlayerInThrowing_Throw;
|
||||||
|
private readonly InputAction m_PlayerInThrowing_AdjustTheAngle;
|
||||||
|
public struct PlayerInThrowingActions
|
||||||
|
{
|
||||||
|
private @Player m_Wrapper;
|
||||||
|
public PlayerInThrowingActions(@Player wrapper) { m_Wrapper = wrapper; }
|
||||||
|
public InputAction @Quit => m_Wrapper.m_PlayerInThrowing_Quit;
|
||||||
|
public InputAction @Throw => m_Wrapper.m_PlayerInThrowing_Throw;
|
||||||
|
public InputAction @AdjustTheAngle => m_Wrapper.m_PlayerInThrowing_AdjustTheAngle;
|
||||||
|
public InputActionMap Get() { return m_Wrapper.m_PlayerInThrowing; }
|
||||||
|
public void Enable() { Get().Enable(); }
|
||||||
|
public void Disable() { Get().Disable(); }
|
||||||
|
public bool enabled => Get().enabled;
|
||||||
|
public static implicit operator InputActionMap(PlayerInThrowingActions set) { return set.Get(); }
|
||||||
|
public void SetCallbacks(IPlayerInThrowingActions instance)
|
||||||
|
{
|
||||||
|
if (m_Wrapper.m_PlayerInThrowingActionsCallbackInterface != null)
|
||||||
|
{
|
||||||
|
@Quit.started -= m_Wrapper.m_PlayerInThrowingActionsCallbackInterface.OnQuit;
|
||||||
|
@Quit.performed -= m_Wrapper.m_PlayerInThrowingActionsCallbackInterface.OnQuit;
|
||||||
|
@Quit.canceled -= m_Wrapper.m_PlayerInThrowingActionsCallbackInterface.OnQuit;
|
||||||
|
@Throw.started -= m_Wrapper.m_PlayerInThrowingActionsCallbackInterface.OnThrow;
|
||||||
|
@Throw.performed -= m_Wrapper.m_PlayerInThrowingActionsCallbackInterface.OnThrow;
|
||||||
|
@Throw.canceled -= m_Wrapper.m_PlayerInThrowingActionsCallbackInterface.OnThrow;
|
||||||
|
@AdjustTheAngle.started -= m_Wrapper.m_PlayerInThrowingActionsCallbackInterface.OnAdjustTheAngle;
|
||||||
|
@AdjustTheAngle.performed -= m_Wrapper.m_PlayerInThrowingActionsCallbackInterface.OnAdjustTheAngle;
|
||||||
|
@AdjustTheAngle.canceled -= m_Wrapper.m_PlayerInThrowingActionsCallbackInterface.OnAdjustTheAngle;
|
||||||
|
}
|
||||||
|
m_Wrapper.m_PlayerInThrowingActionsCallbackInterface = instance;
|
||||||
|
if (instance != null)
|
||||||
|
{
|
||||||
|
@Quit.started += instance.OnQuit;
|
||||||
|
@Quit.performed += instance.OnQuit;
|
||||||
|
@Quit.canceled += instance.OnQuit;
|
||||||
|
@Throw.started += instance.OnThrow;
|
||||||
|
@Throw.performed += instance.OnThrow;
|
||||||
|
@Throw.canceled += instance.OnThrow;
|
||||||
|
@AdjustTheAngle.started += instance.OnAdjustTheAngle;
|
||||||
|
@AdjustTheAngle.performed += instance.OnAdjustTheAngle;
|
||||||
|
@AdjustTheAngle.canceled += instance.OnAdjustTheAngle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public PlayerInThrowingActions @PlayerInThrowing => new PlayerInThrowingActions(this);
|
||||||
private int m_PlayerSchemeIndex = -1;
|
private int m_PlayerSchemeIndex = -1;
|
||||||
public InputControlScheme PlayerScheme
|
public InputControlScheme PlayerScheme
|
||||||
{
|
{
|
||||||
@ -330,4 +589,14 @@ public class @Player : IInputActionCollection, IDisposable
|
|||||||
void OnInteraction(InputAction.CallbackContext context);
|
void OnInteraction(InputAction.CallbackContext context);
|
||||||
void OnCoding(InputAction.CallbackContext context);
|
void OnCoding(InputAction.CallbackContext context);
|
||||||
}
|
}
|
||||||
|
public interface INullMapActions
|
||||||
|
{
|
||||||
|
void OnNewaction(InputAction.CallbackContext context);
|
||||||
|
}
|
||||||
|
public interface IPlayerInThrowingActions
|
||||||
|
{
|
||||||
|
void OnQuit(InputAction.CallbackContext context);
|
||||||
|
void OnThrow(InputAction.CallbackContext context);
|
||||||
|
void OnAdjustTheAngle(InputAction.CallbackContext context);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -172,6 +172,175 @@
|
|||||||
"isPartOfComposite": false
|
"isPartOfComposite": false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "NullMap",
|
||||||
|
"id": "c4624120-51ed-40d4-859d-23407e1af549",
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"name": "New action",
|
||||||
|
"type": "Button",
|
||||||
|
"id": "beabb251-6f14-495d-9364-88119e0f9bf0",
|
||||||
|
"expectedControlType": "Button",
|
||||||
|
"processors": "",
|
||||||
|
"interactions": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"bindings": [
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"id": "ae26865a-51e7-44ff-aea5-7c92da228cef",
|
||||||
|
"path": "",
|
||||||
|
"interactions": "",
|
||||||
|
"processors": "",
|
||||||
|
"groups": "",
|
||||||
|
"action": "New action",
|
||||||
|
"isComposite": false,
|
||||||
|
"isPartOfComposite": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "PlayerInThrowing",
|
||||||
|
"id": "ce68185c-0387-41f3-b3e6-fa39ba2919e5",
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"name": "Quit",
|
||||||
|
"type": "Button",
|
||||||
|
"id": "078b3370-2cb6-4574-9156-0146ae814573",
|
||||||
|
"expectedControlType": "Button",
|
||||||
|
"processors": "",
|
||||||
|
"interactions": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Throw",
|
||||||
|
"type": "Button",
|
||||||
|
"id": "6bab4454-55d6-409c-9736-d1640a407628",
|
||||||
|
"expectedControlType": "Button",
|
||||||
|
"processors": "",
|
||||||
|
"interactions": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "AdjustTheAngle",
|
||||||
|
"type": "Value",
|
||||||
|
"id": "fddd4068-5ae8-4c1a-8498-4c8c30327f57",
|
||||||
|
"expectedControlType": "Axis",
|
||||||
|
"processors": "",
|
||||||
|
"interactions": ""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"bindings": [
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"id": "4c3ccd32-0010-4273-951a-4280201b6418",
|
||||||
|
"path": "<Gamepad>/buttonEast",
|
||||||
|
"interactions": "",
|
||||||
|
"processors": "",
|
||||||
|
"groups": "Player",
|
||||||
|
"action": "Quit",
|
||||||
|
"isComposite": false,
|
||||||
|
"isPartOfComposite": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"id": "e28bf435-0e2c-4e22-887e-66dc54eb99c2",
|
||||||
|
"path": "<Keyboard>/k",
|
||||||
|
"interactions": "",
|
||||||
|
"processors": "",
|
||||||
|
"groups": "Player",
|
||||||
|
"action": "Quit",
|
||||||
|
"isComposite": false,
|
||||||
|
"isPartOfComposite": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"id": "72d81a4a-c61f-4b02-8495-19d0fe279d6c",
|
||||||
|
"path": "<Keyboard>/shift",
|
||||||
|
"interactions": "",
|
||||||
|
"processors": "",
|
||||||
|
"groups": "Player",
|
||||||
|
"action": "Throw",
|
||||||
|
"isComposite": false,
|
||||||
|
"isPartOfComposite": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"id": "42108f89-0858-4a1e-8ca9-f92d541b2328",
|
||||||
|
"path": "<Gamepad>/rightTrigger",
|
||||||
|
"interactions": "",
|
||||||
|
"processors": "",
|
||||||
|
"groups": "Player",
|
||||||
|
"action": "Throw",
|
||||||
|
"isComposite": false,
|
||||||
|
"isPartOfComposite": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "1D Axis",
|
||||||
|
"id": "ea410c6c-a556-403c-8a68-002f5b70e7c0",
|
||||||
|
"path": "1DAxis",
|
||||||
|
"interactions": "",
|
||||||
|
"processors": "",
|
||||||
|
"groups": "",
|
||||||
|
"action": "AdjustTheAngle",
|
||||||
|
"isComposite": true,
|
||||||
|
"isPartOfComposite": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "negative",
|
||||||
|
"id": "96e2ca69-cab5-4c52-8bf7-8e3e98800a2f",
|
||||||
|
"path": "<Keyboard>/s",
|
||||||
|
"interactions": "",
|
||||||
|
"processors": "",
|
||||||
|
"groups": "Player",
|
||||||
|
"action": "AdjustTheAngle",
|
||||||
|
"isComposite": false,
|
||||||
|
"isPartOfComposite": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "positive",
|
||||||
|
"id": "c016c203-a320-411b-9ec1-2dadd19d628a",
|
||||||
|
"path": "<Keyboard>/w",
|
||||||
|
"interactions": "",
|
||||||
|
"processors": "",
|
||||||
|
"groups": "Player",
|
||||||
|
"action": "AdjustTheAngle",
|
||||||
|
"isComposite": false,
|
||||||
|
"isPartOfComposite": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "1D Axis",
|
||||||
|
"id": "85e86d8c-ef51-4e91-9833-416f07830ef7",
|
||||||
|
"path": "1DAxis",
|
||||||
|
"interactions": "",
|
||||||
|
"processors": "",
|
||||||
|
"groups": "",
|
||||||
|
"action": "AdjustTheAngle",
|
||||||
|
"isComposite": true,
|
||||||
|
"isPartOfComposite": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "negative",
|
||||||
|
"id": "dbde76be-6fa4-4ffa-b56c-889e98ce208a",
|
||||||
|
"path": "<Gamepad>/leftStick/down",
|
||||||
|
"interactions": "",
|
||||||
|
"processors": "",
|
||||||
|
"groups": "Player",
|
||||||
|
"action": "AdjustTheAngle",
|
||||||
|
"isComposite": false,
|
||||||
|
"isPartOfComposite": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "positive",
|
||||||
|
"id": "b0d81269-947f-44bf-9dc6-4f11746d6eb2",
|
||||||
|
"path": "<Gamepad>/leftStick/up",
|
||||||
|
"interactions": "",
|
||||||
|
"processors": "",
|
||||||
|
"groups": "Player",
|
||||||
|
"action": "AdjustTheAngle",
|
||||||
|
"isComposite": false,
|
||||||
|
"isPartOfComposite": true
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"controlSchemes": [
|
"controlSchemes": [
|
||||||
|
@ -44,6 +44,6 @@ Material:
|
|||||||
- WaveIntensity_2: 1
|
- WaveIntensity_2: 1
|
||||||
- WaveSpread_Value: 0
|
- WaveSpread_Value: 0
|
||||||
m_Colors:
|
m_Colors:
|
||||||
- Center: {r: -1.1923603, g: 0.2857927, b: 0, a: 0}
|
- Center: {r: 0.16475901, g: 0.08327937, b: 0, a: 0}
|
||||||
- Vector2_d2d098295fc146f08b921b231b2e5199: {r: 1.6, g: 0.9, b: 0, a: 0}
|
- Vector2_d2d098295fc146f08b921b231b2e5199: {r: 1.6, g: 0.9, b: 0, a: 0}
|
||||||
m_BuildTextureStacks: []
|
m_BuildTextureStacks: []
|
||||||
|
123
Assets/Prefabs/投掷物.prefab
Normal file
123
Assets/Prefabs/投掷物.prefab
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &4018427281142380165
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4018427281142380185}
|
||||||
|
- component: {fileID: 4018427281142380166}
|
||||||
|
- component: {fileID: 4018427281142380167}
|
||||||
|
- component: {fileID: 4018427281142380164}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: "\u6295\u63B7\u7269"
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &4018427281142380185
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4018427281142380165}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 1.26, y: -2.0112507, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!212 &4018427281142380166
|
||||||
|
SpriteRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4018427281142380165}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 0
|
||||||
|
m_ReceiveShadows: 0
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 0
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 0
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 1
|
||||||
|
m_Sprite: {fileID: 21300000, guid: 6f62c397230d6d845b87a8e53d67c0e1, type: 3}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_FlipX: 0
|
||||||
|
m_FlipY: 0
|
||||||
|
m_DrawMode: 0
|
||||||
|
m_Size: {x: 1, y: 1}
|
||||||
|
m_AdaptiveModeThreshold: 0.5
|
||||||
|
m_SpriteTileMode: 0
|
||||||
|
m_WasSpriteAssigned: 1
|
||||||
|
m_MaskInteraction: 0
|
||||||
|
m_SpriteSortPoint: 0
|
||||||
|
--- !u!50 &4018427281142380167
|
||||||
|
Rigidbody2D:
|
||||||
|
serializedVersion: 4
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4018427281142380165}
|
||||||
|
m_BodyType: 0
|
||||||
|
m_Simulated: 1
|
||||||
|
m_UseFullKinematicContacts: 0
|
||||||
|
m_UseAutoMass: 0
|
||||||
|
m_Mass: 1
|
||||||
|
m_LinearDrag: 0
|
||||||
|
m_AngularDrag: 0.05
|
||||||
|
m_GravityScale: 1
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Interpolate: 0
|
||||||
|
m_SleepingMode: 1
|
||||||
|
m_CollisionDetection: 0
|
||||||
|
m_Constraints: 0
|
||||||
|
--- !u!70 &4018427281142380164
|
||||||
|
CapsuleCollider2D:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4018427281142380165}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_Density: 1
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_UsedByEffector: 0
|
||||||
|
m_UsedByComposite: 0
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Size: {x: 1, y: 1}
|
||||||
|
m_Direction: 0
|
7
Assets/Prefabs/投掷物.prefab.meta
Normal file
7
Assets/Prefabs/投掷物.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 628f0c1ef857ddd4687c94b8ba9b1aa6
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -588,7 +588,7 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.019539753, y: 0.23600002}
|
m_AnchorMin: {x: 0.019539753, y: 0.23600002}
|
||||||
m_AnchorMax: {x: 0.47471207, y: 0.5}
|
m_AnchorMax: {x: 0.47471207, y: 0.5}
|
||||||
m_AnchoredPosition: {x: 0.11991882, y: 2}
|
m_AnchoredPosition: {x: 0.119903564, y: 2}
|
||||||
m_SizeDelta: {x: -15, y: -16}
|
m_SizeDelta: {x: -15, y: -16}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &144076822
|
--- !u!114 &144076822
|
||||||
@ -669,7 +669,7 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.61048114, y: 0.20600002}
|
m_AnchorMin: {x: 0.61048114, y: 0.20600002}
|
||||||
m_AnchorMax: {x: 0.86200005, y: 0.572}
|
m_AnchorMax: {x: 0.86200005, y: 0.572}
|
||||||
m_AnchoredPosition: {x: -432.00006, y: -3.9000244}
|
m_AnchoredPosition: {x: -432.00006, y: -3.9000397}
|
||||||
m_SizeDelta: {x: 297, y: 142}
|
m_SizeDelta: {x: 297, y: 142}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &181444957
|
--- !u!114 &181444957
|
||||||
@ -3807,6 +3807,8 @@ Transform:
|
|||||||
- {fileID: 305985608}
|
- {fileID: 305985608}
|
||||||
- {fileID: 1170258148}
|
- {fileID: 1170258148}
|
||||||
- {fileID: 913332110}
|
- {fileID: 913332110}
|
||||||
|
- {fileID: 1488455137}
|
||||||
|
- {fileID: 1494853250}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 2
|
m_RootOrder: 2
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
@ -4060,6 +4062,159 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
content: "\u516B\u8DEF\u519B"
|
content: "\u516B\u8DEF\u519B"
|
||||||
num: 864246511
|
num: 864246511
|
||||||
|
--- !u!1 &1488455136
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1488455137}
|
||||||
|
- component: {fileID: 1488455140}
|
||||||
|
- component: {fileID: 1488455138}
|
||||||
|
- component: {fileID: 1488455139}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: "\u6295\u63B7\u7269"
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1488455137
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1488455136}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: -12.81, y: -1.82, z: 0}
|
||||||
|
m_LocalScale: {x: 0.24867, y: 0.24867, z: 0.24867}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 1258629581}
|
||||||
|
m_RootOrder: 12
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!61 &1488455138
|
||||||
|
BoxCollider2D:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1488455136}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_Density: 1
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 1
|
||||||
|
m_UsedByEffector: 0
|
||||||
|
m_UsedByComposite: 0
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_SpriteTilingProperty:
|
||||||
|
border: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
pivot: {x: 0.5, y: 0.5}
|
||||||
|
oldSize: {x: 3.6, y: 3.6}
|
||||||
|
newSize: {x: 3.6, y: 3.6}
|
||||||
|
adaptiveTilingThreshold: 0.5
|
||||||
|
drawMode: 0
|
||||||
|
adaptiveTiling: 0
|
||||||
|
m_AutoTiling: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Size: {x: 3.6, y: 3.6}
|
||||||
|
m_EdgeRadius: 0
|
||||||
|
--- !u!114 &1488455139
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1488455136}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: ea9b46e6ad9699a4399143d3a1fb6409, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_interface: {fileID: 0}
|
||||||
|
--- !u!212 &1488455140
|
||||||
|
SpriteRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1488455136}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 0
|
||||||
|
m_ReceiveShadows: 0
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 0
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 0
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 1
|
||||||
|
m_Sprite: {fileID: 21300000, guid: bcd5b5f11de95ec4ba92005e4a404502, type: 3}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_FlipX: 0
|
||||||
|
m_FlipY: 0
|
||||||
|
m_DrawMode: 0
|
||||||
|
m_Size: {x: 3.6, y: 3.6}
|
||||||
|
m_AdaptiveModeThreshold: 0.5
|
||||||
|
m_SpriteTileMode: 0
|
||||||
|
m_WasSpriteAssigned: 1
|
||||||
|
m_MaskInteraction: 0
|
||||||
|
m_SpriteSortPoint: 0
|
||||||
|
--- !u!1 &1494853249
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1494853250}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: "\u5730\u96F7"
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1494853250
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1494853249}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 1258629581}
|
||||||
|
m_RootOrder: 13
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &1500782587
|
--- !u!1 &1500782587
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -4724,6 +4879,36 @@ CanvasRenderer:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1773029877}
|
m_GameObject: {fileID: 1773029877}
|
||||||
m_CullTransparentMesh: 1
|
m_CullTransparentMesh: 1
|
||||||
|
--- !u!1 &1792787061
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1792787062}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: "\u6295\u63B7\u70B9"
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1792787062
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1792787061}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 1.75, y: 0.44, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 1811221470}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &1811221464
|
--- !u!1 &1811221464
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -4758,6 +4943,8 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
catched: {fileID: 0}
|
catched: {fileID: 0}
|
||||||
|
missile: {fileID: 4018427281142380165, guid: 628f0c1ef857ddd4687c94b8ba9b1aa6, type: 3}
|
||||||
|
throwOffset: {fileID: 1792787062}
|
||||||
--- !u!50 &1811221466
|
--- !u!50 &1811221466
|
||||||
Rigidbody2D:
|
Rigidbody2D:
|
||||||
serializedVersion: 4
|
serializedVersion: 4
|
||||||
@ -4894,6 +5081,46 @@ MonoBehaviour:
|
|||||||
m_CallState: 2
|
m_CallState: 2
|
||||||
m_ActionId: f7af9390-5dad-4c80-a4a7-83d8314f8e88
|
m_ActionId: f7af9390-5dad-4c80-a4a7-83d8314f8e88
|
||||||
m_ActionName: PlayerNormal/Codeing[/XInputControllerWindows/rightTrigger,/Keyboard/space]
|
m_ActionName: PlayerNormal/Codeing[/XInputControllerWindows/rightTrigger,/Keyboard/space]
|
||||||
|
- m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_ActionId: beabb251-6f14-495d-9364-88119e0f9bf0
|
||||||
|
m_ActionName: NullMap/New action
|
||||||
|
- m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_ActionId: 078b3370-2cb6-4574-9156-0146ae814573
|
||||||
|
m_ActionName: PlayerInThrowing/Quit[/Keyboard/k]
|
||||||
|
- m_PersistentCalls:
|
||||||
|
m_Calls:
|
||||||
|
- m_Target: {fileID: 1811221465}
|
||||||
|
m_TargetAssemblyTypeName: M_Player, Assembly-CSharp
|
||||||
|
m_MethodName: OnThrow
|
||||||
|
m_Mode: 0
|
||||||
|
m_Arguments:
|
||||||
|
m_ObjectArgument: {fileID: 0}
|
||||||
|
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||||
|
m_IntArgument: 0
|
||||||
|
m_FloatArgument: 0
|
||||||
|
m_StringArgument:
|
||||||
|
m_BoolArgument: 0
|
||||||
|
m_CallState: 2
|
||||||
|
m_ActionId: 6bab4454-55d6-409c-9736-d1640a407628
|
||||||
|
m_ActionName: PlayerInThrowing/Throw[/Keyboard/shift]
|
||||||
|
- m_PersistentCalls:
|
||||||
|
m_Calls:
|
||||||
|
- m_Target: {fileID: 1811221465}
|
||||||
|
m_TargetAssemblyTypeName: M_Player, Assembly-CSharp
|
||||||
|
m_MethodName: OnAdjustTheAngle
|
||||||
|
m_Mode: 0
|
||||||
|
m_Arguments:
|
||||||
|
m_ObjectArgument: {fileID: 0}
|
||||||
|
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||||
|
m_IntArgument: 0
|
||||||
|
m_FloatArgument: 0
|
||||||
|
m_StringArgument:
|
||||||
|
m_BoolArgument: 0
|
||||||
|
m_CallState: 2
|
||||||
|
m_ActionId: fddd4068-5ae8-4c1a-8498-4c8c30327f57
|
||||||
|
m_ActionName: PlayerInThrowing/AdjustTheAngle[/Keyboard/s,/Keyboard/w]
|
||||||
m_NeverAutoSwitchControlSchemes: 0
|
m_NeverAutoSwitchControlSchemes: 0
|
||||||
m_DefaultControlScheme: Player
|
m_DefaultControlScheme: Player
|
||||||
m_DefaultActionMap: PlayerNormal
|
m_DefaultActionMap: PlayerNormal
|
||||||
@ -4960,7 +5187,8 @@ Transform:
|
|||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0.19902964, y: -2.0566175, z: 0.09978611}
|
m_LocalPosition: {x: 0.19902964, y: -2.0566175, z: 0.09978611}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children:
|
||||||
|
- {fileID: 1792787062}
|
||||||
m_Father: {fileID: 1568214228}
|
m_Father: {fileID: 1568214228}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
@ -5492,6 +5720,8 @@ MonoBehaviour:
|
|||||||
shellFallingTime: 1
|
shellFallingTime: 1
|
||||||
shellShadowRangeOfChange: 0.1
|
shellShadowRangeOfChange: 0.1
|
||||||
shellShadowPositionYOffSet: 1.5
|
shellShadowPositionYOffSet: 1.5
|
||||||
|
rateOfChangeOfThrowingAngle: 10
|
||||||
|
strengthOfThrowing: 5
|
||||||
--- !u!4 &2039349954
|
--- !u!4 &2039349954
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -5823,7 +6053,7 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.028, y: 0.8655201}
|
m_AnchorMin: {x: 0.028, y: 0.8655201}
|
||||||
m_AnchorMax: {x: 0.2527861, y: 0.95120806}
|
m_AnchorMax: {x: 0.2527861, y: 0.95120806}
|
||||||
m_AnchoredPosition: {x: 1.0001526, y: -0.1533966}
|
m_AnchoredPosition: {x: 1.0002136, y: -0.1533966}
|
||||||
m_SizeDelta: {x: -6.6341, y: -3.6931992}
|
m_SizeDelta: {x: -6.6341, y: -3.6931992}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &2083069445
|
--- !u!114 &2083069445
|
||||||
|
@ -32,7 +32,10 @@ public class IndexRecoder : MonoBehaviour
|
|||||||
public float shellShadowRangeOfChange;
|
public float shellShadowRangeOfChange;
|
||||||
[Tooltip("炮弹阴影的Y值偏移")]
|
[Tooltip("炮弹阴影的Y值偏移")]
|
||||||
public float shellShadowPositionYOffSet;
|
public float shellShadowPositionYOffSet;
|
||||||
|
[Tooltip("玩家投掷角度变化的速度")]
|
||||||
|
public float rateOfChangeOfThrowingAngle;
|
||||||
|
[Tooltip("抛出投掷物的力度")]
|
||||||
|
public float strengthOfThrowing;
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
|
@ -15,21 +15,29 @@ public class M_Player : MonoBehaviour
|
|||||||
//public GameObject bullet;//子弹预制体
|
//public GameObject bullet;//子弹预制体
|
||||||
private int faceDir;//面部朝向,-1、1
|
private int faceDir;//面部朝向,-1、1
|
||||||
private float runSpeedMultiple = 1f;//速度倍率,在按下和释放跑步后被修改
|
private float runSpeedMultiple = 1f;//速度倍率,在按下和释放跑步后被修改
|
||||||
|
[Tooltip("所捕捉到的可交互对象,不要手动赋值,这个会自己捕捉")]
|
||||||
public Interactive catched;//所捕捉到的可交互对象
|
public Interactive catched;//所捕捉到的可交互对象
|
||||||
|
private bool throwingState = false;//记录当前是否在投掷状态
|
||||||
|
private PlayerInput playerInput;//自身输入组件,用来切换操控地图
|
||||||
|
private bool canAdjustTheAngle = false;//记录此时自己是否能调整投掷角度
|
||||||
|
private float throwingAngle = 45f;//记录投掷的角度.默认是45°
|
||||||
|
private float throwingAngleDir;//记录此时投掷角度变化的速度,包括大小和方向,-1~1表示
|
||||||
|
[Tooltip("投掷物的预制体")]
|
||||||
|
public GameObject missile;//投掷物的预制体
|
||||||
|
[Tooltip("投掷物抛出点")]
|
||||||
|
public Transform throwOffset;//记录一下抛出点的位置
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
//获取数值记录组件,方便策划修改暴露参数
|
indexRecoder = FindObjectOfType<IndexRecoder>();//获取数值记录组件,方便策划修改暴露参数
|
||||||
indexRecoder = FindObjectOfType<IndexRecoder>();
|
m_rigidbody = GetComponent<Rigidbody2D>();//获取自身刚体组件
|
||||||
//获取自身刚体组件
|
faceDir = 1;//默认面部朝右
|
||||||
m_rigidbody = GetComponent<Rigidbody2D>();
|
playerInput = GetComponent<PlayerInput>(); //获取自身输入组件
|
||||||
//默认面部朝右
|
|
||||||
faceDir = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
|
AdjustTheAngle();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FixedUpdate()
|
void FixedUpdate()
|
||||||
@ -37,6 +45,21 @@ public class M_Player : MonoBehaviour
|
|||||||
Move();
|
Move();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void AdjustTheAngle()
|
||||||
|
{
|
||||||
|
if(canAdjustTheAngle)//如果玩家正在调整角度
|
||||||
|
{
|
||||||
|
throwingAngle += throwingAngleDir//则让现在的抛出角度加上变化的速度
|
||||||
|
* indexRecoder.rateOfChangeOfThrowingAngle//乘以变化的速率
|
||||||
|
* Time.deltaTime;//使其与时间无关
|
||||||
|
Debug.DrawLine(transform.position,
|
||||||
|
new Vector3(transform.position.x + 100*Mathf.Cos(throwingAngle),
|
||||||
|
transform.position.y + 100*Mathf.Sin(throwingAngle),
|
||||||
|
transform.position.z),
|
||||||
|
Color.red);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//当水平轴有输入
|
//当水平轴有输入
|
||||||
public void OnMoveHorizons(InputAction.CallbackContext context)
|
public void OnMoveHorizons(InputAction.CallbackContext context)
|
||||||
{
|
{
|
||||||
@ -61,12 +84,6 @@ public class M_Player : MonoBehaviour
|
|||||||
transform.localScale.z);
|
transform.localScale.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnFire()
|
|
||||||
{
|
|
||||||
// GameObject temp = Instantiate(bullet,m_rigidbody.position,Quaternion.identity);
|
|
||||||
// temp.GetComponent<Bullet>().SetDir(faceDir);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Move()
|
private void Move()
|
||||||
{
|
{
|
||||||
//指定水平方向的速度
|
//指定水平方向的速度
|
||||||
@ -78,12 +95,31 @@ public class M_Player : MonoBehaviour
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnJump()
|
public void OnThrow(InputAction.CallbackContext context)
|
||||||
{
|
{
|
||||||
//跳的时候给一个垂直向上的速度
|
if(context.started)//如果按下投掷键,表示可以开始控制角度了
|
||||||
m_rigidbody.velocity = new Vector2(0,indexRecoder.playerJumpSpeed);
|
{
|
||||||
|
canAdjustTheAngle = true;
|
||||||
|
}
|
||||||
|
if(context.canceled)//如果是刚松开投掷键,表示要丢东西了
|
||||||
|
{
|
||||||
|
Throw();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void OnAdjustTheAngle(InputAction.CallbackContext context)
|
||||||
|
{throwingAngleDir = context.ReadValue<float>();}//把收到的轴的值交给角度变化的大小和方向
|
||||||
|
|
||||||
|
private void Throw()
|
||||||
|
{
|
||||||
|
Debug.Log("我投出手上拿着的东西了");
|
||||||
|
Rigidbody2D rigidbodyOfMissile =
|
||||||
|
Instantiate(missile,throwOffset.position,Quaternion.identity).GetComponent<Rigidbody2D>();
|
||||||
|
rigidbodyOfMissile.velocity = new Vector2(indexRecoder.strengthOfThrowing*Mathf.Cos(throwingAngle),
|
||||||
|
indexRecoder.strengthOfThrowing*Mathf.Sin(throwingAngle));
|
||||||
|
}
|
||||||
|
|
||||||
|
//进入跑步状态的控制代码
|
||||||
public void OnRun(InputAction.CallbackContext context)
|
public void OnRun(InputAction.CallbackContext context)
|
||||||
{
|
{
|
||||||
if(context.started)//如果刚按下跑步键
|
if(context.started)//如果刚按下跑步键
|
||||||
@ -136,5 +172,14 @@ public class M_Player : MonoBehaviour
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void EnterThrowingState()
|
||||||
|
{
|
||||||
|
throwingState = true;//修改自身记录状态变量,表示正式进入投掷状态
|
||||||
|
//1.切换操控地图
|
||||||
|
playerInput.SwitchCurrentActionMap("PlayerInThrowing");
|
||||||
|
//2.动画相关
|
||||||
|
//
|
||||||
|
}
|
||||||
|
public void QuitThrowingsState(){}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
26
Assets/Scripts/Missile.cs
Normal file
26
Assets/Scripts/Missile.cs
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class Missile : Interactive
|
||||||
|
{
|
||||||
|
// Start is called before the first frame update
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
public override void OnCall()
|
||||||
|
{
|
||||||
|
//当投掷物被触发交互
|
||||||
|
//1.通知玩家进入投掷状态
|
||||||
|
FindObjectOfType<M_Player>().EnterThrowingState();
|
||||||
|
//2.后续物理相关修改
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
11
Assets/Scripts/Missile.cs.meta
Normal file
11
Assets/Scripts/Missile.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ea9b46e6ad9699a4399143d3a1fb6409
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Loading…
x
Reference in New Issue
Block a user