5. HUD element example HUD Display List HUD Display List A = Shell_dragonWidget A B = Green Dragon Icon B A = Shell_dragonWidget A C C = Red Dragon Icon
6. HUD Display List HUD element example continued Camera Display List E F G H A A = Shell_dragonWidget C C = Red Dragon Icon
7. Camera Display List G Complex Menu Display List C E D B F J M Z A H Complex Subelement Mini-Display List
11. Getting a Functor CObj CObj Functor List F1 F2 CFunctor *pFunc = CObj->FindFunctor(“F2”); OR CFunctor *pFunc = CObj->FindFunctor(cobj_functor_type); F2
12.
13.
14.
15. Apply Functor: “Render” to the Camera Display List Camera Display List G Complex Menu Display List C E J M Z A H Complex Subelement Mini-Display List
16.
17. Apply Functors “Animate”, “Transform”, and “Render” Animated Frame List Transform Frame List Camera Display List A C D E F G H
18. I, Voltron, highly recommend Functors. You can attach or detach them from your classes to change your functionality dynamically as the situation demands. I can tell you from experience that it was a bitch getting all these different robot lion heads to interface properly in C++. But with functors, I didn’t have to care about the interface! I just say, “Left Arm fire!” or “Right Arm Detach!”
Hinweis der Redaktion
You don’t have to touch the camera’s display list when you are messing with individual elements of the HUD object.
Functors allow
The parameter list typically contains a single CObject, the ‘this’ object. If it contained more objects, the functor would operate on those objects, too.