
Lv.1
在毛站一生乐子,没有什么贡献/Q:2511419702
签名:🔸2021-07-08加入社区 🔸2021-09-14加入代码岛 🔸2021-09-18成立工作室 🔸2022-03-05加入海龟编辑器 🔸2022-05-01加入coco编辑器 🔸2022-06-07加入小说编辑器 🔸都看到这了,给个免费的关注在走吧!
在 出现招人问题 中回复
我想帮你,但是我自己就有工作室imgsr喵demao.cn/emoji/codemao/%E7%BC%96%E7%A8%8B%E7%8C%AB_%E5%8A%A0%E6%B2%B9.gif"alt="emotion_编程猫_加油"
2021-09-26T17:26:30 点赞:0
在 【毁图神器】围猎小鸡是毁图神器? 中回复
console.clear() varDefaultScale=[0.0625,0.0625,0.0625]; varQuat=newBox3Quaternion(0,0,0,1); varscore=0 functionspawn(x,y,z,meshName){ if(world.entityQuota()<=0){return}//如果可分配的实体小于等于0,就不再创建新的模型 varentity=world.createEntity({ mesh:meshName,//模型名 collides:true,//能碰撞 fixed:false,//固定 gravity:true,//受重力下落 meshScale:DefaultScale,//模型放大倍数 position:[x,y,z],//位置坐标 friction:0.5,//摩擦力 }) entity.enableDamage=true//允许公鸡受伤 entity.onVoxelContact(({x,y,z,voxel})=>{//当公鸡碰到地形方块 //当公鸡落地后,随机改变移动速度 entity.velocity.y=0.5+Math.random()*0.5 entity.velocity.x=(Math.random()-0.5)*0.5 entity.velocity.z=(Math.random()-0.5)*0.5 if(voxel===voxels.id('stone')){//如果公鸡碰到了石头方块,什么也不发生 }elseif(voxel===voxels.id('lava02')){//如果公鸡碰到了岩浆 entity.hurt(40)//公鸡扣40生命 }else{ voxels.setVoxel(x,y,z,'')//公鸡可以破坏其他类型的方块 } }) entity.onEntityContact(({other})=>{//当公鸡碰到另一个模型实体 if(other.isPlayer){//如果另一个模型实体是玩家 other.hurt(20)//这个玩家扣20生命 } }) varhandler=world.onTick(()=>{//计时循环,每秒更新16次公鸡的朝向 entity.meshOrientation=Quat.rotateY(Math.atan2(entity.velocity.z,entity.velocity.x))//公鸡朝向自己的移动方向 }) entity.onDie(()=>{//当公鸡喵(enitity.hp<=0) entity.destroy()//删除公鸡实体 score++; world.say('已经收拾了'+score+'只公鸡') }) entity.onDestroy(()=>{//当公鸡实体被删除 handler.cancel()//取消控制公鸡朝向的计时循环 }) returnentity } for(vari=0;i<250;i++){//生成250只公鸡模型实体 spawn(63,11+i,63,'mesh/公鸡.vb') } world.onPlayerJoin(({entity})=>{//当有新玩家进入游戏 entity.enableDamage=true//允许玩家受伤 entity.onVoxelSeparate(({x,y,z,voxel})=>{//玩家离开方块的时候 //spawn(x+0.5,y+1.5,z+0.5,'mesh/公鸡.vb')//在离开的方块留下公鸡模型 voxels.setVoxel(x,y+1,z,'lava02')//岩浆突出到地面 }) }) world.onPlayerLeave(({entity})=>{//当有玩家离开游戏 world.say('恭送'+entity.player.name)//世界广播 }) world.onChat(({entity,message})=>{//当有玩家在输入框发送消息 if(message==='1'){//如果那名玩家输入的是1 //让所有实体对你说欢迎 varallEntities=world.querySelectorAll('*'); for(vareofallEntities){ if(e.isPlayer){continue}//如果实体是玩家,就跳过 e.say('欢迎'+entity.player.name) } }elseif(message==='2'){ //让位置在(60,0,60)~(70,120,70)之间的实体对你说欢迎 varfoundEntities=world.searchBox(newBox3Bounds3( newBox3Vector3(60,0,60), newBox3Vector3(70,120,70), )) for(vareoffoundEntities){ if(e.isPlayer){continue}//如果实体是玩家,就跳过 e.say('hello'+entity.player.name) } }elseif(message==='复活'){ entity.hp=entity.maxHp entity.position.x=10 entity.position.y=50 entity.position.z=10 } }) world.breakVoxelSound=world.placeVoxelSound=''
2022-01-02T09:12:45 点赞:0
在 【活动】训练师小课堂已上线!各路大佬速速发帖投稿! 中回复
猴急,他吞我图片,还吞我格式,我写了半个小时啊!imgsrc="https://static.codemao.cn/emoji/codemao/%E7%BC%96%E7%A8%8B%E7%8C%AB_%E8%80%8D%E8%B5%96.gif"alt="emotion_编程猫_耍赖"imgsrc="https://static.codemao.cn/emoji/codemao/%E7%BC%96%E7%A8%8B%E7%8C%AB_%E8%80%8D%E8%B5%96.gif"alt="emotion_编程猫_耍赖"imgsrc="https://static.codemao.cn/emoji/codemao/%E7%BC%96%E7%A8%8B%E7%8C%AB_%E4%BC%A4%E5%BF%83.gif"alt="emotion_编程猫_伤心"imgsrc="https://static.codemao.cn/emoji/codemao/%E7%BC%96%E7%A8%8B%E7%8C%AB_%E4%BC%A4%E5%BF%83.gif"alt="emotion_编程猫_伤心"
2022-03-06T13:16:35 点赞:0
在 关于格式被吞 中回复
我写了差不多一小时的帖子……imgsrc="https://static.codemao.cn/emoji/codemao/%E7%BC%96%E7%A8%8B%E7%8C%AB_%E4%BC%A4%E5%BF%83.gif"alt="emotion_编程猫_伤心"
2022-03-06T14:04:04 点赞:0