breakpoint

before update unity version
This commit is contained in:
CortexCore
2024-03-04 18:45:21 +08:00
parent e2fbb14dd5
commit 9ad58a2ff4
5423 changed files with 14757 additions and 653 deletions

View File

@@ -23,13 +23,26 @@ namespace BITKit
public readonly ValidHandle allowInput = new();
private readonly ConcurrentDictionary<string,InputAction> actions = new();
/// <summary>
/// 注册所有(started,performed,canceled)回调
/// </summary>
/// <param name="reference"></param>
/// <param name="callback"></param>
/// <returns></returns>
public InputActionGroup RegisterCallback(InputActionReference reference,
Action<InputAction.CallbackContext> callback)
{
var action = EnsureCreated(reference);
action.RegisterCallback(callback);
return this;
}
public InputAction EnsureCreated(InputActionReference reference)
{
if (reference is null)
{
Debug.LogWarning($"未知的引用");
return this;
return null;
}
EnsureConfiguration();
@@ -39,12 +52,12 @@ namespace BITKit
newAction.Rename(reference.name);
return newAction;
});
action.RegisterCallback(callback);
allowInput.Invoke();
return this;
return action;
}
public void Inherit(InputActionGroup other)
{
throw new NotImplementedException();