Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <functional>
- //.h
- struct FCharacterCombatState
- {
- std::function<void(void)> OnBeginState;
- FCharacterCombatState()
- {
- }
- };
- class MyClass
- {
- MyClass();
- FCharacterCombatState CombatState;
- void Foo();
- };
- //.cpp
- MyClass::MyClass()
- {
- CombatState = FCharacterCombatState();
- CombatState.OnBeginState = [this]() {
- this->Foo();
- };
- }
- void MyClass::Foo()
- {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement