当前位置:网站首页>[ue4] event distribution mechanism of reflective event distributor and active call event mechanism
[ue4] event distribution mechanism of reflective event distributor and active call event mechanism
2022-07-01 04:26:00 【Cheap meow】
Law 1 Active call event mechanism
1. When an event needs to be sent Actor Get the event that needs to be accepted Actor References to

2. When an event needs to be sent Actor Invoking events that need to be accepted Actor Events

Law 2 Event distribution mechanism of reflective event distributor
1. When an event needs to be sent Actor New event distributor in

2. When an event needs to be sent Actor Calling event dispatcher in

3. When the event needs to be accepted Actor Get the event that needs to be sent Actor References to , Subscribe to events that need to be sent Actor Event dispenser for


One is passive, the other is active , I can't say which is better ……
But from a structural point of view , It's better for an input component to be only responsible for its own affairs , So the way of reflection is better
To put it in detail is , If you want to take the initiative , Need to send events Actor Need to know who needs to accept the event Actor, To call its event . But actually I act as an input port , I'm only responsible for accepting input , I don't want to know who I'm going to give , If I want to know who I need to pass the input to , Then I'm not with the increase of the number of projects , To write a long list of objects that I need to call events ? This is not elegant , It's easy to make a mistake , Why don't you come and get it yourself , Come and get it if you need it , I don't care who you are , I'm just responsible for giving it out . So there's a lot less code . and , For those who need to accept Events Actor, Although it needs to know what events need to be sent Actor Who is it? , But it happens to be in charge of it : I need it , I'm going to
边栏推荐
- Coinbase in a bear market: losses, layoffs, stock price plunges
- Note de développement du système embarqué 80: application du concepteur Qt à la conception de l'interface principale
- TASK04|数理统计
- 2022年T电梯修理题库及模拟考试
- Recommend the best product development process in the Internet industry!
- Possible problems and solutions of using scroll view to implement slider view
- 多次跳槽后,月薪等于老同事的年薪
- 2022 polymerization process test questions and simulation test
- 类和对象收尾
- CF1638E colorful operations
猜你喜欢

Question bank and online simulation examination for special operation certificate of G1 industrial boiler stoker in 2022

Programs and processes, process management, foreground and background processes

HoloLens2开发环境搭建及部署app

【人话版】WEB3黑暗森林中的隐私博弈

使用WinMTR软件简单分析跟踪检测网络路由情况

Recommend the best product development process in the Internet industry!

After many job hopping, the monthly salary is equal to the annual salary of old colleagues

Common thread methods and daemon threads

Embedded System Development Notes 79: why should I get the IP address of the local network card

Class and object finalization
随机推荐
软件研发的十大浪费:研发效能的另一面
Codeforces Round #721 (Div. 2)B1. Palindrome Game (easy version)B2. Palindrome game (hard version)
[untitled] Li Kou 496 Next larger element I
Odeint et GPU
2022年G1工业锅炉司炉特种作业证考试题库及在线模拟考试
How to choose the right server for website data collection?
Embedded System Development Notes 80: using QT designer to design the main interface
Embedded System Development Notes 81: Using Dialog component to design prompt dialog box
类和对象收尾
JS image path conversion Base64 format
MySQL winter vacation self-study 2022 12 (5)
(12) Somersault cloud case (navigation bar highlights follow)
Execution failed for task ‘:app:processDebugResources‘. > A failure occurred while executing com. and
OdeInt與GPU
[deep learning] (4) decoder mechanism in transformer, complete pytoch code attached
LeetCode 1827. Increment array with minimal operation
2022年T电梯修理题库及模拟考试
Browser top loading (from Zhihu)
如何看待智慧城市建设中的改变和机遇?
嵌入式系統開發筆記80:應用Qt Designer進行主界面設計