发包方min1
其它分类项目
项目类型
待商议
项目预算
7天
预计开发时间
不限 不限
区域限制
项目内容描述
网址:https://miniroyale.io/
网页吃鸡小游戏做个外挂,自瞄,武器加倍伤害,我有一段代码,也可以帮忙完善
const onMovementUpdateAnimation = Movement.prototype.updateAnimation;
const HEAD_OFFSET = 0.4;
const RENDER_LINE_STEP = 0.001;
const RENDER_LINE_WIDTH = 0.03;
const RED_COLOR = new pc.Color(1, 0, 0);
function renderLine(application, from, to, color) {
for (let i = 0; i < RENDER_LINE_WIDTH; i += RENDER_LINE_STEP) {
const fromOffset = new pc.Vec3(from.x + i, from.y, from.z + i);
const toOffset = new pc.Vec3(to.x + i, (to.y - HEAD_OFFSET), to.z + i);
application.renderLine(fromOffset, toOffset, color);
}
}
Movement.prototype.updateAnimation = function () {
onMovementUpdateAnimation.apply(this, arguments);
const position = this.entity.getPosition().clone();
const enemies = this.playerManager.script.playerManager.players;
for (const enemy of enemies) {
renderLine(this.app, enemy.localPosition, position, RED_COLOR);
}
}
const onEnemyDamage = Enemy.prototype.damage;
const DAMAGE_X = 5;
Enemy.prototype.damage = function () {
for (let i = 0; i <= DAMAGE_X; i++) {
onEnemyDamage.apply(this, arguments);
}
};
竞标人数:4人 剩余竞标席位:26人