Closed Lomadriel closed 9 years ago
No need to do something about it, since we can use lambda expressions. By the way, in most of the cases, we will rather prefer to use lambda expressions to call an object method, static functions, or, if you need a function / method with parameters. See, in playerControl example we have that :
keyboardManager.addBinding("moveRight", sf::Keyboard::Right, [&character](){
character.moveRight();
});
But, if we had a method move(std::string direction), we could do as following :
keyboardManager.addBinding("moveRight", sf::Keyboard::Right, [&character](){
character.move("right");
});
No problem :+1:
Indeed
Add a support of function parameters in InputManager. (with template) For Instance :
std::function<void(int)> funct
instead ofstd::function<void()> funct