用户:
Beck_sea查看:3 回复:6 评论:3 创建时间:2022-05-02T19:14:57
想做一个对话框,框框的背景颜色为红色,但是打了以下代码后:
world.onPlayerJoin(({ entity }) => {
if (entity.player.name != 'Bec溜') {
const dialog = entity.player.dialog({
type: Box3DialogType.TEXT,
title: "旁白",
content: `那声音断断续续的,渐渐消失……`,
contentBackgroundColor:(255,0,0),
});
};
});
为什么框框的背景颜色直接变透明了!!!!
world.onPlayerJoin(({ entity }) => {
if (entity.player.name != 'Bec溜') {
const dialog = entity.player.dialog({
type: Box3DialogType.TEXT,
title: "旁白",
content: `那声音断断续续的,渐渐消失……`,
contentBackgroundColor: new Box3RGBAColor(1,0,0,0),
});
};
});点赞0
评论
https://docs.box3.codemao.cn/box3dialogcall.html#box3textdialogparams https://docs.box3.codemao.cn/box3rgbacolor.html
点赞0
评论