Gats.io - No Camera Movement

helps if you're used to other io games' fixed view

当前为 2021-12-26 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Gats.io - No Camera 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);
    }

})();