Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

优化GameObject事件 #43

Open
wardenfeng opened this issue Jun 7, 2018 · 0 comments
Open

优化GameObject事件 #43

wardenfeng opened this issue Jun 7, 2018 · 0 comments

Comments

@wardenfeng
Copy link
Member

GameObject事件需求

  1. 由GameObject的Component派发的事件将会优先派发给GameObject然后到每一个Component中,如果有冒泡的话最后派发到GameObject的父对象中
  2. 必须写对应的单元测试来测试派发顺序是否正确!

设计优势

  1. 不需要通过GameObject去监听对象,解决了该组件移除,添加到其他GameObject对象上使用off与on来重新添加事件的麻烦。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant