简体   繁体   English

如何使用blockly事件实现多人合作!

[英]How can i use the blockly event to implement multiplayer cooperation!

I've read the blockly's doc, i know that i can get the blockly event by我已经阅读了 blockly 的文档,我知道我可以通过

addChangeListener(event)
removeChangeListener(event)

these two functions.这两个功能。 So i can get many types of blockly events, but how can i use these events to create a block.所以我可以获得许多类型的块事件,但是我怎样才能使用这些事件来创建一个块。

So the situation is that client A get the block events from the server, A need to use these events to create a block.所以情况是客户端A从服务器获取block事件,A需要使用这些事件来创建block。

So how to do this?那么如何做到这一点呢? Anyone know it?有人知道吗?

personally, i've found this link to learn some thing abour the Blockly Realtime Collaboration: https://github.com/google/blockly-samples/tree/master/examples/blockly-rtc就个人而言,我发现这个链接可以了解有关 Blockly 实时协作的一些信息: https://github.com/google/blockly-samples/tree/master/examples/blockly-rtc

this may be helpful, and i will update it if i find something more useful.这可能会有所帮助,如果我发现更有用的东西,我会更新它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM