0
已解决
吕易航
资深守护
资深守护
谷歌小恐龙游戏是浏览器自带的,断网时候可以玩,当然联网状态也是可以玩的
打开chrome, Ctrl + T 新建标签页,Alt + D或者Ctrl + L 定位到地址栏,输入 chrome://dino
摁一下空格,即可开始游戏。
越往后面速度会越快,当屡次失败,觉得明明可以跳过去,但是死活过不去的时候,不要生气,不要灰心,让我们来干他!
摁一下键盘上的F12,你将会看到这个
然后输入以下代码,恐龙将变得无敌!!!
Runner.instance_.gameOver=function(){}
下面是急速快跑代码,参数可修改
Runner.instance_.setSpeed(299792458)
下面是跳高代码,参数可修改
Runner.instance_.tRex.setJumpVelocity(1000000)
0
已采纳
李奕歌
初级天翼
初级天翼
自动代码:
function TrexRunnerBot() {
const makeKeyArgs = (keyCode) => {
const preventDefault = () => void 0; return {keyCode, preventDefault}; };
const upKeyArgs = makeKeyArgs(38); const downKeyArgs = makeKeyArgs(40); const startArgs = makeKeyArgs(32);
if (!Runner().playing) {
Runner().onKeyDown(startArgs); setTimeout(() => {
Runner().onKeyUp(startArgs); }, 500); }
function conquerTheGame() {
if (!Runner || !Runner().horizon.obstacles[0]) return;
const obstacle = Runner().horizon.obstacles[0];
if (obstacle.typeConfig && obstacle.typeConfig.type === 'SNACK') return;
if (needsToTackle(obstacle) && closeEnoughToTackle(obstacle)) tackle(obstacle); }
function needsToTackle(obstacle) {
return obstacle.yPos !== 50; }
function closeEnoughToTackle(obstacle) {
return obstacle.xPos <= Runner().currentSpeed * 18; }
function tackle(obstacle) {
if (isDuckable(obstacle)) {
duck(); } else {
jumpOver(obstacle); }
}
function isDuckable(obstacle) {
return obstacle.yPos == 75; }
function duck() {
drop(); Runner().onKeyDown(downKeyArgs);
setTimeout(() => {
Runner().onKeyUp(downKeyArgs); }, 500); }
function drop() {
Runner().onKeyDown(downKeyArgs);
Runner().onKeyUp(downKeyArgs); }
function jumpOver(obstacle) {
if (isNextObstacleCloseTo(obstacle))
jumpFast(); else
Runner().onKeyDown(upKeyArgs); }
function isNextObstacleCloseTo(currentObstacle) {
const nextObstacle = Runner().horizon.obstacles[1];
return nextObstacle && nextObstacle.xPos - currentObstacle.xPos <=
Runner().currentSpeed * 42; }
function jumpFast() {
Runner().onKeyDown(upKeyArgs); Runner().onKeyUp(upKeyArgs); }
return {conquerTheGame: conquerTheGame}; }
let bot = TrexRunnerBot(); let botInterval = setInterval(bot.conquerTheGame, 2);
李奕歌在2021-07-07 18:48:08追加了内容
可以让小恐龙自动跑
0
0
0
0
0