helps if you're used to other io games' fixed view
当前为
// ==UserScript==
// @name Gats.io - Anti Screen Movement
// @namespace http://tampermonkey.net/
// @version 1.2
// @description helps if you're used to other io games' fixed view
// @author Nitrogem 35
// @match https://gats.io/
// @grant none
// ==/UserScript==
(function() {
'use strict';
setTimeout(function(){
function a57(event) {
relPos = c2.getRelPos(RD.pool[c3].getAttr())
, relPosX = relPos.x * j6
, relPosY = relPos.y * j5
, mouseAngle = Math.atan2(relPosY - event.clientY, relPosX - event.clientX) * 180 / Math.PI + 180
, playerAngle = Math.round(mouseAngle + Math.asin(18 / Math.sqrt(Math.pow(relPosX - event.clientX, 2) + Math.pow(relPosY - event.clientY, 2))) * 180 / Math.PI)
, console.log(mouseAngle, playerAngle);
j16 = [Math.round(relPosX - event.clientX), Math.round(relPosY - event.clientY), Math.round(mouseAngle)],
RD.pool[c3].playerAngle = playerAngle;
};
addJS_Node (a57);
RD.prototype.applyPrimaryUpdate = function(idk) {
if (!this['activated'])
return;
this.x = parseFloat(idk.x / 10),
this.y = parseFloat(idk.y / 10),
idk['id'] != c3 && (this['playerAngle'] = parseInt(idk.playerAngle));
}
}, 1000)
function addJS_Node (text, s_URL, funcToRun, runOnLoad) { //used to add the edited functions to the code
var D = document;
var scriptNode = D.createElement ('script');
if (runOnLoad) {
scriptNode.addEventListener ("load", runOnLoad, false);
}
scriptNode.type = "text/javascript";
if (text) scriptNode.textContent = text;
if (s_URL) scriptNode.src = s_URL;
if (funcToRun) scriptNode.textContent = '(' + funcToRun.toString() + ')()';
var targ = D.getElementsByTagName ('head')[0] || D.body || D.documentElement;
targ.appendChild (scriptNode);
}
})();