用户:༺ཌༀ学海无涯༒苦作舟ༀད༻查看: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) }
} })
还是那个小橙子丫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鸡蛋蛋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
评论