📜  虚幻引擎 c++ 将动作绑定到带参数的函数 - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:46.991000             🧑  作者: Mango

代码示例1
DECLARE_DELEGATE_OneParam(FCustomInputDelegate, const bool);
InputComponent->BindAction("OnSomeInput", IE_Pressed, this, &AMyActor::OnInput, true);

DECLARE_DELEGATE_TwoParams(FAnotherCustomInputDelegate, const bool, const float);
InputComponent->BindAction("OnSomeOtherInput", IE_Pressed, this, &AMyActor::OnOtherInput, true, 10.f);