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

refactor: #1200 #1203

Merged
merged 2 commits into from
Apr 19, 2023
Merged

refactor: #1200 #1203

merged 2 commits into from
Apr 19, 2023

Conversation

lgc2333
Copy link

@lgc2333 lgc2333 commented Apr 19, 2023

Description

PR DESCRIPTION

Issues fixed

#1200

@lgc2333
Copy link
Author

lgc2333 commented Apr 19, 2023

@yqs112358

@yqs112358
Copy link
Member

辛苦

@yqs112358
Copy link
Member

不过叫listen是不是更好一些?感觉比handle更直观
handle容易一眼看成句柄(

@lgc2333
Copy link
Author

lgc2333 commented Apr 19, 2023

不过叫listen是不是更好一些?感觉比handle更直观 handle容易一眼看成句柄(

listen和mc.listen重名了
handle挺不错的

@yqs112358
Copy link
Member

或者叫subscribe?
gametest那边好像就是这个名(订阅/发布模型)

@lgc2333
Copy link
Author

lgc2333 commented Apr 19, 2023

@callstackexceed
🤔

@callstackexceed
Copy link

作为装饰器来说 @handle@subscribe 可读吧

@subscribe('onJoin')
def func():
    ...

@handle('onJoin')
def func():
    ...

比较, @handle 看起来更加声明式编程一点。

@yqs112358
Copy link
Member

作为装饰器来说 @handle@subscribe 可读吧

@subscribe('onJoin')
def func():
    ...

@handle('onJoin')
def func():
    ...

比较, @handle 看起来更加声明式编程一点。

ok

@yqs112358 yqs112358 merged commit cd62fc8 into LiteLDev:develop Apr 19, 2023
ShrBox pushed a commit that referenced this pull request Apr 20, 2023
@ShrBox ShrBox changed the title chore: #1200 refactor: #1200 Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants