猫史档案馆


光轮特效代码大公布

用户:༺ཌༀ学海无涯༒苦作舟ༀད༻༺ཌༀ学海无涯༒苦作舟ༀད༻查看:4 回复:4 评论:4 创建时间:2021-10-29T19:12:09


有了这张帖子,妈妈再也不怕我不会做光轮特效了!废话不多说,直接公布代码!! world.onPress(async ({ entity, button }) => {     if (entity.hasTag('999')) {         if (entity.wuqi === "光能法杖") {             if (button != 'action0') return     const round=world.createEntity({             position:entity.position,             collides:false,             gravity:false,             meshColor:new Box3RGBAColor(1,1,1,1),             mesh:'mesh/光轮特效.vb'         })         var scale=0;         function addScale(){             if(round.destroyed)return;             scale+=0.005;             round.meshScale=new Box3Vector3(scale,0.1,scale);             setTimeout(addScale,5)         }         addScale();         Object.assign(round, {                 particleRate: 3000,                 particleSize: [2, 4, 8, 4, 10],                 particleColor: [                     new Box3RGBColor(1, 1, 1),                     new Box3RGBColor(1, 1, 1),                     new Box3RGBColor(1, 1, 1),                     new Box3RGBColor(1, 1, 1),                     new Box3RGBColor(1, 1, 1),                     new Box3RGBColor(1,1,1)                 ],                 particleLifetime: 1,                 particleVelocitySpread: new Box3Vector3(2, 2, 2),         });         setTimeout(()=>{             round.destroy();         },1000)         }
    } })


回复

上一页1 页 / 共 1下一页
浮生awa浮生awa

。。。格式被吞了

点赞1


评论


还是那个小橙子丫还是那个小橙子丫

world.onPress(async ({ entity, button }) => {     if (entity.hasTag('999')) {         if (entity.wuqi === "光能法杖") {             if (button != 'action0') return     const round=world.createEntity({             position:entity.position,             collides:false,             gravity:false,             meshColor:new Box3RGBAColor(1,1,1,1),             mesh:'mesh/光轮特效.vb'         })         var scale=0;         function addScale(){             if(round.destroyed)return;             scale+=0.005;             round.meshScale=new Box3Vector3(scale,0.1,scale);             setTimeout(addScale,5)         }         addScale();         Object.assign(round, {                 particleRate: 3000,                 particleSize: [2, 4, 8, 4, 10],                 particleColor: [                     new Box3RGBColor(1, 1, 1),                     new Box3RGBColor(1, 1, 1),                     new Box3RGBColor(1, 1, 1),                     new Box3RGBColor(1, 1, 1),                     new Box3RGBColor(1, 1, 1),                     new Box3RGBColor(1,1,1)                 ],                 particleLifetime: 1,                 particleVelocitySpread: new Box3Vector3(2, 2, 2),         });         setTimeout(()=>{             round.destroy();         },1000)         }
    } })

点赞0


评论


薹灣解放再改名薹灣解放再改名

world.onPress(async ({ entity, button }) => {     if (entity.hasTag('999')) {         if (entity.wuqi === "光能法杖") {             if (button != 'action0') return     const round=world.createEntity({             position:entity.position,             collides:false,             gravity:false,             meshColor:new Box3RGBAColor(1,1,1,1),             mesh:'mesh/光轮特效.vb'         })         var scale=0;         function addScale(){             if(round.destroyed)return;             scale+=0.005;             round.meshScale=new Box3Vector3(scale,0.1,scale);             setTimeout(addScale,5)         }         addScale();         Object.assign(round, {                 particleRate: 3000,                 particleSize: [2, 4, 8, 4, 10],                 particleColor: [                     new Box3RGBColor(1, 1, 1),                     new Box3RGBColor(1, 1, 1),                     new Box3RGBColor(1, 1, 1),                     new Box3RGBColor(1, 1, 1),                     new Box3RGBColor(1, 1, 1),                     new Box3RGBColor(1,1,1)                 ],                 particleLifetime: 1,                 particleVelocitySpread: new Box3Vector3(2, 2, 2),         });         setTimeout(()=>{             round.destroy();         },1000)         }
    } })

真是服了

点赞0


评论


egg鸡蛋蛋egg鸡蛋蛋

world.onPress(async ({ entity, button }) => {
   // if (entity.hasTag('999')) {
       // if (entity.wuqi === "光能法杖") {
            if (button = 'action0') {
            const round = world.createEntity({
                position: entity.position,
                collides: false,
                gravity: false,
                meshColor: new Box3RGBAColor(1, 1, 1, 1),
                mesh: 'mesh/光轮特效.vb'
            })
            var scale = 0; function addScale() {
                if (round.destroyed) return;
                scale += 0.005;
                round.meshScale = new Box3Vector3(scale, 0.1, scale); setTimeout(addScale, 5)
            }
            addScale();
            Object.assign(round, {
                particleRate: 3000,
                particleSize: [2, 4, 8, 4, 10],
                particleColor: [new Box3RGBColor(1, 1, 1), new Box3RGBColor(1, 1, 1), new Box3RGBColor(1, 1, 1), new Box3RGBColor(1, 1, 1), new Box3RGBColor(1, 1, 1), new Box3RGBColor(1, 1, 1)],
                particleLifetime: 1, particleVelocitySpread: new Box3Vector3(2, 2, 2),
            }); setTimeout(() => {
                round.destroy();
            }, 1000)
        //}
    }
})



点赞0


评论