
Lv.1
5编程猫首页 6神岛首页 TC创意工坊
在 谁知道哪个铺子可以抠图、找图?质量高、速度快,不花钱 中回复
我免费抠图,不要金币
链接:https://shequ.codemao.cn/community/339823
2020-09-04T16:59:20 点赞:0
在 无双喵,你和吉吉的合照被我喵啦 中回复
牛!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!(但看着像PS的)
2020-09-09T16:41:41 点赞:0
在 大佬们谁教我怎么做蹦蹦床 中回复
world.querySelectorAll('.蹦床').forEach((e) => {//选中标签为‘打飞’的模型
e.onEntityContact(({ entity, other }) => {//设置目标模型的碰撞事件.
if (!other.isPlayer) { return } //防止非玩家实体参与检测.(这三句话是不是似曾相识啊(*^▽^*))
other.velocity.y += 5;//然后将玩家以正Y轴甩飞出去
})//万能框架
})//万能框架2020-09-13T16:56:56 点赞:1
在 管喵代码全揭秘(其他板) 中回复
world.querySelectorAll(".作者专用").forEach((finder) => {//新建一个叫作者专用的实体,(放在一个隐蔽的地方)
finder.enableInteract = true;
finder.interactRadius = 8;
finder.interactHint = "作者专用";
finder.interactColor = new Box3RGBColor(1, 1, 1);
finder.onInteract(async ({ entity }) => {
const result = await entity.player.dialog({
title: '系统',
type: Box3DialogType.INPUT,
content: `你要关哪个玩家?`,
titleBackgroundColor: new Box3RGBAColor(0.968, 0.702, 0.392, 1),
placeholder: '请输入玩家名', //输入玩家名
confirmText: '确认',
})
const findee = world.querySelector("." + result);
const resu=await entity.player.dialog({
title: '系统',
type: Box3DialogType.SELECT,
content: `找到玩家${findee.player.name}`,
titleBackgroundColor: new Box3RGBAColor(0.968, 0.702, 0.392, 1),
lookEye: entity,
lookEyeOffset: new Box3Vector3(0, 30, 0),
lookTarget: findee,
options:["确认"],
})
if(resu.index==0){
entity.position.set(findee.position.x,findee.position.y+2,findee.position.z)
}
entity.position.set(12,5,116)//监狱的位置
findee.player.dialog({
title: '系统',
type: Box3DialogType.TEXT,
content: `你被管喵关进了监狱`,
titleBackgroundColor: new Box3RGBAColor(0.968, 0.702, 0.392, 1),
})
})
})
world.onChat(({ entity, message }) => {
if (message === '作者,我错了') {//对方输入后回到出生点
entity.position.set(122,15,122)//出生点位置
} else if (message === 'shrink') {
entity.player.spawnPoint.set(122,15,122)
}
})2020-09-26T16:35:30 点赞:0
在 找师傅啦! 中回复
这才叫代码
world.onPlayerJoin(({entity})=>{
entity.position.set(55,10,70)
entity.player.backupplayermesh = entity.mesh;
entity.player.spawnPoint.set(55,10,70)
})
world.onPlayerJoin(({ entity }) => {
if (entity.player.name === "机器人5号")
entity.player.canFly = true;
}
)
world.onChat(({ entity, message }) => {
if (entity&&entity.isPlayer) {
if(entity&&'机器人5号'.split(' ').indexOf(entity.player.name)!=-1&&message.charAt(0)=='$'){
try{
world.say('<~ '+eval(message.split('$')[1]))}catch(err){
world.say('Error:'+err)
}
};
}
})
world.querySelectorAll('.蹦床').forEach((e) => {//选中标签为‘打飞’的模型
e.onEntityContact(({ entity, other }) => {//设置目标模型的碰撞事件.
if (!other.isPlayer) { return } //防止非玩家实体参与检测.(这三句话是不是似曾相识啊(*^▽^*))
other.velocity.y += 7;//然后将玩家以正Y轴甩飞出去
})//万能框架
})//万能框架
world.querySelectorAll('.鸟').forEach((e) => {//选中标签为‘打飞’的模型
e.onEntityContact(({ entity, other }) => {//设置目标模型的碰撞事件.
if (!other.isPlayer) { return } //防止非玩家实体参与检测.(这三句话是不是似曾相识啊(*^▽^*))
world.say("叽叽")
})//万能框架
})//万能框架
world.querySelectorAll('.car').forEach((e) => {
e.onEntityContact(({ entity, other }) => { //设置目标模型的碰撞事件.
if (!other.isPlayer) {
return;
} //防止非玩家实体参与检测.
if (other.player.ondrive) {
return other.player.directMessage("您正在驾驶载具")
}//如果正在驾驶的话就返回
other.mesh = entity.mesh; //设置玩家的外观.
other.meshScale = entity.meshScale; //设置玩家外观缩放比例.
other.player.invisible = true; //如果模型比玩家小,就需要隐藏玩家的皮肤.
other.meshOrientation = new Box3Quaternion(0, -1, 0, 0);
//上面代码的意思是:如果模型的正面不是开车的方向就调一下
other.player.runSpeed = 1.5;
other.player.ondrive = true;
entity.collides = false;
entity.meshInvisible = true;
world.say(other.player.name + "开走了小汽车,别撞人!");
setTimeout(()=>{
entity.collides = true;
entity.meshInvisible = false;
},5000)
});
});
world.onTick(async({tick})=>{//重复执行!!!
world.querySelectorAll('.车').forEach((e)=>{//如果实体标签为“车”
e.position.z+=1//z轴持续+1
if(e.position.z>125){//假如超过一定范围
e.position.z=80//把它抓回去!!
}
})//别忘了框架哦
})
world.onTick(async({tick})=>{//重复执行!
world.querySelectorAll('.NPC').forEach((e)=>{//如果实体标签为“车”
e.position.z+=1//z轴持续+1
if(e.position.z>60){//假如超过一定范围
e.position.z=1//把它抓回去!!
}
})//别忘了框架哦
})
world.onTick(async({tick})=>{
world.querySelectorAll('.还原').forEach((h)=>{//当碰到有还原标签的模型,变回玩家
h.onEntityContact(({other})=>{
if(!other.isPlayer)
{
return;
}
other.mesh = other.player.backupplayermesh;
other.player.runSpeed = 1
other.player.invisible = false;
other.player.ondrive=false;
})
})
})
world.onTick(async({tick})=>{
world.querySelectorAll('.start').forEach((s)=>{
s.onEntityContact(({other})=>{
if(!other.isPlayer)
{
return;
}
other.position.set(25,60,14)
other.player.spawnPoint.set(25,60,14)
other.enableDamage = true;
})
})
})
world.onTick(async({tick})=>{
world.querySelectorAll('.player').forEach((p)=>{
if(p.isPlayer=true){
if(p.player.rungamestart)
{
if(p.velocity.y<50)
{
p.player.forceRespawn();
}
}
}
})
})
world.onTick(async({tick})=>{
world.querySelectorAll('.lv2').forEach((lv2)=>{
lv2.onEntityContact(({other})=>{
if(!other.isPlayer)
{
return;
}
other.player.spawnPoint.set(5,53,42)
})
})
})
world.onTick(async({tick})=>{
world.querySelectorAll('.lv3').forEach((lv3)=>{
lv3.onEntityContact(({other})=>{
if(!other.isPlayer)
{
return;
}
other.player.spawnPoint.set(5,53,100)
})
})
})
world.onTick(async({tick})=>{
world.querySelectorAll('.lv4').forEach((lv4)=>{
lv4.onEntityContact(({other})=>{
if(!other.isPlayer)
{
return;
}
other.player.spawnPoint.set(5,53,117)
})
})
})
world.onTick(async({tick})=>{
world.querySelectorAll('.lv5').forEach((lv5)=>{
lv5.onEntityContact(({other})=>{
if(!other.isPlayer)
{
return;
}
other.player.spawnPoint.set(9,65,125)
})
})
})
world.querySelectorAll('.lv6').forEach((e) => {//选中标签为‘打飞’的模型
e.onEntityContact(({ entity, other }) => {//设置目标模型的碰撞事件.
if (!other.isPlayer) { return } //防止非玩家实体参与检测.(这三句话是不是似曾相识啊(*^▽^*))
world.say("恭喜到达终点!")//然后将玩家以正Y轴甩飞出去
})//万能框架
})//万能框架
world.onPlayerJoin(({ entity }) => {
entity.player.addWearable({
bodyPart: Box3BodyPart.HIPS,//装备穿戴的位置在臀部
mesh: 'mesh/天使之翼.vb',//装备是一个叫做“天使之翼”的模型
orientation: new Box3Quaternion(0, 1, 0, 1),//将模型的旋转角度调整
scale: new Box3Vector3(5,5,5),//模型大小长宽高都放大5倍(这段话憋管它)
emissive:number = 0,//荧光度
metalness:number =1,//金属感
shininess: number =1,//反光度
color: Box3RGBColor = new Box3RGBColor(7,90,242),//装备的颜色
offset: new Box3Vector3(0,2,0)//装备的位置,向人背后偏移一些(偏移的X轴是左右手,将X轴的0.5改成-0.5就是左手)
});
});2020-09-30T16:10:32 点赞:0