
Lv.1
就让这一切从头开始吧
签名:离线中
在 【哈农更新闹元宵】你喜欢甜汤圆还是咸汤圆? 中回复
祝大家节日快乐,送大家一个烟花:
world.querySelectorAll('.烟花').forEach((e)=>{
world.onTick(({tick})=>{
const timeOfDay = (world.sunPhase + world.sunFrequency * tick) % 1;
if(timeOfDay > 0.55 && timeOfDay < 1 && Math.random() < 0.05){
const bullet = world.createEntity({
mesh: 'mesh/烟花~.vb',
meshScale: new Box3Vector3(0.1,0.1,0.1),
position: e.position,
gravity: false,
fixed: true,
particleLimit: 100,
particleRate: 100,
particleSize: [5,4,3,2,1],
particleLifetime: 0.2,
collides: false,
});
(async function(){
const a喵 = Math.random();
await sleep((1 + a喵)*2500);
bullet.velocity.y = 0;
bullet.particleSize = [10,8,6,4,2];
bullet.particleColor = [[1,0,0],[1,0.2,0],[1,0.5,0],[1,0.8,0],[1,1,0]];
bullet.particleLifetime = 2;
bullet.particleVelocitySpread = new Box3Vector3(20,20,20);
bullet.particleVelocity.y = -0.5;
await sleep(500);
bullet.destroy();
})()
bullet.velocity.y = 2;
}
})
})
(仅夜晚生效)
2021-02-26T20:41:31 点赞:0
在 【岛3活动】大神在线写代码NO.2,你想实现的我都会! 中回复
后排说过的我都会唉,还有,向官方提出一个BUG:
a = world.createEntity(Box3Entity);//这里是象征性的,放入一个任意的Box3Entity
a.destroy();//没有销毁掉2021-03-20T07:51:38 点赞:0
在 怎么在代码岛3.0里获取焦点位置的方块? 中回复
world.onPlayerJoin(({entity})=>entity.onPress(({raycast})=>{
raycast.voxelIndex;//就是这个呀
}))2021-03-23T12:38:59 点赞:0
在 这段代码哪里错了啊? 中回复
world.onVoxelContact(({ entity, voxel, axis }) => {
if (!entity.isPlayer) return;
const voxelName = voxels.name(voxel);
if (voxelName === 'nine' && axis.y === 1){
world.say(`${entity.player.name} 来到了第九关:豆腐渣之桥,并变小了`)
entity.player.scale += 1.7;
}
})
怎么两个函数的右括号都没了?
2021-04-08T18:05:48 点赞:0