
Lv.1
2023.7.10的晚上发布最后一条聊天,此后不再参与论坛聊天(除非有人呼叫汪汪队doge
在 【结界】人物动作模拟器() 中回复
class People {
Clean (entity, speed = 0.1) { // 旋转
(entity.direction < 0) && (entity.direction = Math.PI * 2 + entity.direction);
(entity.angle < 0) && (entity.angle = Math.PI * 2 + entity.angle, entity.angle %= Math.PI * 2);
(Math.min(Math.abs(entity.direction - entity.angle), Math.abs(Math.PI * 2 - entity.direction + entity.angle)) < speed) ? (entity.angle = entity.direction) : (entity.direction > entity.angle) ? (entity.direction - entity.angle < Math.PI ? entity.angle += speed : entity.angle -= speed) : (entity.direction + (Math.PI * 2 - entity.angle) < Math.PI ? entity.angle += speed : entity.angle -= speed);
}
constructor (count) {
this.angle = 0;
this.AnGle = { angle: 0 };
this.direction = this.AnGle.direction = Math.atan2(direction.z, direction.x);
if (count % 11 === 0) {
let target = world.querySelectorAll('player').sort((a, b) => {
return a.position.distance(this.position) - b.position.distance(this.position);
})[0]; if (target && target.hp != 0) this.target = target;
};
if (this.target && !this.target.destroyed) {
var direction = this.target.position.sub(this.position);
var speed = 0.4 + Math.random() * 1;
this.Clean(this); this.Clean(this.AnGle, 0.3);
this.velocity.set(Math.cos(this.angle) * Math.cos(0) * speed, -Math.sin(0) * speed, Math.sin(this.angle) * Math.cos(0) * speed);
};
}
};
给顶吗()
旋转追踪更加丝滑(
2023-04-14T18:11:46 点赞:0
在 超级喵的折叠背包() 中回复
var s = ['物品*99']; var i = s.split('*'); if (parseInt(i[1]) > 100) world.say('购买成功');
简单来说就是这个()
2023-05-15T20:24:59 点赞:0