猫史档案馆


【教程】特效对话框

用户:ComsComs查看: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)

center_image

 

 

 


回复

上一页1 页 / 共 1下一页
ComsComs

awa给个关注趴(bushi)center_image

点赞0


评论


仙之鹤仙之鹤

合作吗?

点赞0


评论


无敌版滑稽战神无敌版滑稽战神

嗦实话(((真没看懂(((

点赞0


评论


ComsComs

world.onPlayerJoin(({ entity }) => {

   entity.player.dhk('给个关注怕趴~~~',1000,true)

})

举个例子

点赞0


评论


ComsComs

world.onPlayerJoin(({ entity }) => {

 

   entity.player.dhk('给个关注怕趴~~~/*内容*/',1000/*时间*/,true/*开启光标*/)

 

})

点赞2


评论


ComsComs

ddd

点赞0


评论


ComsComs

var 喵 = world.querySelector('#名字');
喵.enableInteract = true;   
喵.interactHint = '名字';    //显示
喵.interactRadius = 1;     //距离
world.onInteract( ({entity, targetEntity}) => {
    entity.player.dhk('给个关注怕趴~~~',1000,true)
});

点赞0


评论


ComsComs

ddd

点赞0


评论


汤圆渊源汤圆渊源

收藏()

点赞0


评论


此人为迪迦此人为迪迦

哈?()()())

点赞0


评论


Star_Ink_sansStar_Ink_sans

emotion_编程猫_搓头

点赞0


评论


ComsComs

ddd

点赞0


评论


NysidlaNysidla

手坤玩家?6()

点赞0


评论


屑羽yee屑羽yee

6)

点赞0


评论