Hitting a Button -> Executing any class function I give it in the parameters (C++)
- by Barnes Noble
Can anyone help me with class function parameter callbacks?
I'm not so sure how to set it up in my code here:
http://codepad.org/fvwHtDjQ
Basically I've got a player and an enemy.
I have two buttons.
One button when clicked should let the player jump. The other should make the enemy hit something.
When clicked, each button has to correspond to the class function in the parameters.
I'm not sure how to set it up though.