用户:
Coms查看:27 回复:14 评论:27 创建时间:2023-02-25T06:38:34
awa,好久没出教程力)今天就水一期~)
咋做出一个好看的对话框呢)代码如下)()
---------------------------------------------------------------------------------------------防窥线(---------------------------------------------------------------------------------------------
console.clear()
/* 定义对话框 */
Box喵layer.prototype.dhk = function(content,time,hasarrow,property = {}){
const interval = time / content.length;
for(let i = 0;i < content.length;i++){
const result = this.dialog(Object.assign(property,{
type: Box3DialogType.TEXT,// 对话框类型,也可以试试选择对话框Box3DialogType.SEL
content: content.substring(0,i + 1),
hasArrow: hasarrow// 开启光标
}))
if(i < content.length - 1){
setTimeout(result.cancel,interval * (i + 1));
}
}
}
问题来了)怎么使用能()用player.dhk就可以力()
没有了
随便透露一下新坑~~~(bushi)

Comsworld.onPlayerJoin(({ entity }) => {
entity.player.dhk('给个关注怕趴~~~/*内容*/',1000/*时间*/,true/*开启光标*/)
})
点赞2
评论
Comsvar 喵 = world.querySelector('#名字');
喵.enableInteract = true;
喵.interactHint = '名字'; //显示
喵.interactRadius = 1; //距离
world.onInteract( ({entity, targetEntity}) => {
entity.player.dhk('给个关注怕趴~~~',1000,true)
});点赞0
评论