Merge branch 'main' of http://212.24.110.183:3000/IPSEITY/Unheimlich_POC
# Conflicts: # Assets/TextMesh Pro/Fonts/TMP_Assets/CourierPrime-Regular SDF.asset # Assets/TextMesh Pro/Fonts/TMP_Assets/CutiveMono-Regular SDF.asset # Assets/TextMesh Pro/Fonts/TMP_Assets/Inconsolata-VariableFont_wdth,wght SDF.asset # Assets/TextMesh Pro/Fonts/TMP_Assets/OxygenMono-Regular SDF.asset # Assets/TextMesh Pro/Fonts/TMP_Assets/ShareTechMono-Regular SDF.asset # Assets/TextMesh Pro/Fonts/TMP_Assets/SpecialElite-Regular SDF.asset # Assets/_Content/Prefabs/OctoPlayerFP.prefab # Packages/OctoCore/Runtime/Scripts/Components/OctoPlayer.cs
This commit is contained in:
@@ -227,11 +227,16 @@ namespace OctoCore.Inputs
|
||||
{
|
||||
var actionInfo = kvp.Value;
|
||||
|
||||
if (actionInfo.Reference.action.expectedControlType != "Vector2")
|
||||
continue;
|
||||
|
||||
Vector2 value = actionInfo.Reference.action.ReadValue<Vector2>();
|
||||
|
||||
// Only poll enabled actions with callbacks
|
||||
if (actionInfo.Enabled &&
|
||||
actionInfo.Reference != null &&
|
||||
(actionInfo.CallbacksList.Count > 0 || actionInfo.CallbacksVector2List.Count > 0) &&
|
||||
actionInfo.Reference.action.IsPressed())
|
||||
value.sqrMagnitude > .0001f)
|
||||
{
|
||||
// Call Action callbacks
|
||||
foreach (var callback in actionInfo.CallbacksList.ToArray())
|
||||
@@ -242,7 +247,6 @@ namespace OctoCore.Inputs
|
||||
// Call Vector2 callbacks
|
||||
foreach (var callback in actionInfo.CallbacksVector2List.ToArray())
|
||||
{
|
||||
Vector2 value = actionInfo.Reference.action.ReadValue<Vector2>();
|
||||
callback?.Invoke(value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user