猫史档案馆


die码求助,如何快速给实体打上标签

用户:灵清帝王吃爆一切厕所灵清帝王吃爆一切厕所查看:1 回复:1 评论:1 创建时间:2022-04-08T13:32:02


const DefaulScale = [1/32, 1/32, 1/32];

function spawn(x,y,z,meshName){
    var entity = world.createEntity({
        mesh:meshName,//模型名
        collides:true,//能碰撞
        fixed:true,//位置固定
        friction:1,//摩擦力=0.5
        meshScale:DefaulScale,//模型放大倍数
        position:[x,y,z],//位置坐标
    });     
};

for(let x = 0; x <= 200; x++) {
    spawn(Math.random()*256, 9, Math.random()*256, 'mesh/大力球.vb')
}

这个代码咋改一下才能变成能给每个大力球实体都打上标签啊qwq

急急急!!!


回复

上一页1 页 / 共 1下一页
Forzen_SevenForzen_Seven

createEntity后写entity.a喵Tag('标签')

点赞1


评论