用户:1232RvE查看:21 回复:6 评论:21 创建时间:2020-06-15T20:17:23
你们知道box3中的门怎么做么?
【大片群众】恩,我知道
额,看来我不用教了……
【大片群众】你快教!
额好吧
上代码
world.querySelectorAll('.门').forEach((e)=>{
e.onEntityContact(async({entity})=>{
设置标签:门 为实体化,并编写代码
以上代码检测碰撞事件
entity.position.x+=1;
entity.position.x+=1;
entity.position.x+=1;
entity.position.x+=1;
entity.position.x+=1;
//懒得循环
额,懒得循环
我们给它蹦过去
嗯哼,蹦回来
await sleep(2000);
entity.position.x-=1;
entity.position.x-=1;
entity.position.x-=1;
entity.position.x-=1;
entity.position.x-=1;
喵的循环呀!
再加上结尾
world.say('1232RvE:有人把门拉开了……');})})
ok
毕竟是即兴,没有多么详细
捧个场呗
自古沙发归楼主
你们得从板凳开始……