Premium Only Content
Function Pointers (InputManager Class) | C++ in 2021
In this lesson, I guide you through using c ++ function pointer and lambdas to store and invoke callbacks from anywhere in your applications.
This is demonstrated through a mock Input Manager that you might find in a game engine implementation.
We start off by mocking out the manager, support accepting c ++ function pointers and then enhancing the class to accept a wider set of functions using std::function and lambdas.
Professional C++ by Marc Gregoire: https://amzn.to/3h4HGmW
Chapters:
0:00 Intro
1:10 Designing the implementation
3:25 Creating the InputManager class
6:10 C Function Pointer
7:54 Continuing InputManager Implementation
11:15 Demonstrating Callbacks (Function Pointer)
15:20 std::function
16:50 std::bind - Binding object member function
23:45 C++ Lambdas (introduction, templates, auto)
31:45 Bound Lambdas (capturing `this`)
34:01 BONUS -- Blocking Input layers
___
Godot Dragonbones is a custom Godot engine build with the godot_dragonbones module that I am maintaining and distributing. It provides full-featured, 2D Skeletal animation support for the DragonBones API; a free, open source alternative to Spine: 2D Skeletal Animation.
PLEASE SUBSCRIBE!
https://cutt.ly/zdCef9v
JOIN OUR DISCORD:
https://discord.gg/bXMkFsg
DONATE HERE:
https://cutt.ly/zdCnvmj
GET GODOT DRAGONBONES HERE (Windows, Linux, Mac):
http://godotdragonbones.com
Godot-Dragonbones module included with this build of engine:
https://github.com/mauville-technologies/godot-dragonbones
If you're interested in using this in your projects but would like more guidance, leave a comment letting me know what you'd like me to explain next.
-
17:53
Fit'n Fire
15 hours ago $0.69 earnedA Rifle for the Family -- BCM MK2 BFH and Gunnr Optics Odin 1-10x28mm LPVO
7.09K2 -
1:03:52
GrassRootsWarriorNetwork
1 month agoWe The People Are The News Now While MSM Is On It’s Way Out - YourNews.com with Sam Anthony
7.57K -
21:12
DeVory Darkins
10 hours ago $13.88 earnedGavin Newsom gets what he deserves after NBC Reporter FACT CHECKS his Lies
38.7K47 -
1:57:13
MyronGainesX
11 hours agoFormer Fed Explains Sting That Led To The Murder Of A State Trooper
68.9K20 -
3:56:27
Due Dissidence
17 hours agoNewsom ROASTED For Pod Save Interview, Candace Owens CALLS OUT Elon, Ian Carroll RATIOES Israel Post
68K52 -
2:16:17
TheSaltyCracker
9 hours agoLooters Descend on LA ReeEEeE Stream 01-12-25
138K275 -
40:32
Man in America
13 hours agoRockefeller Medicine COLLAPSES as God's Natural Healing Takes Over w/ Angie Tomky
47.8K17 -
2:03:30
Nerdrotic
11 hours ago $6.62 earnedMysteries of Egypt with The Brothers of the Serpent | Forbidden Frontier #087
50.7K3 -
2:29:27
vivafrei
18 hours agoEp. 245: Los Angeles ON FIRE! Gavin Newsom FOR JAIL? Trump SENTENCED! Pardons & MORE! VIva & Barnes
200K305 -
5:32:42
Nobodies Live
10 hours ago $5.29 earnedNobodiesLive - Rumble Music TEST STREAM 2.0
65.8K2