用户:
老李头13zl查看:1 回复:1 评论:1 创建时间:2022-11-22T09:41:36
先看一段代码
var bag = await entity.player.dialog({
type: Box3DialogType.SELECT,
title: `背包`,
titleTextColor: new Box3RGBAColor(0, 0, 0, 1),
titleBackgroundColor: new Box3RGBAColor(0, 0.3, 1, 1),
content: `${entity.player.name} 的背包\n共${entity.item.length}件`,
options: entity.item,
contentTextColor: new Box3RGBAColor(0, 0, 0, 1),
contentBackgroundColor: new Box3RGBAColor(1, 1, 1, 1),
})
if(!bag||bag==null){
return
我想在options后面的entity.item
最后会返回一个结果到bag
但是怎么写呢,
就是bag.index不行
bag.name也不行
怎么写!
希望大佬指点!!!!