# Google dino Cheat 小恐龍作弊程式 ## 使用場域 複製此網址至網址列:chrome://dino/ ## 使用手段 > 偵測物件距離並提前跳躍 ```javascript= function dinoAI() { if (Runner.instance_.horizon.obstacles.length > 0) { let dist = Runner.instance_.horizon.obstacles[0].xPos; let obj = Runner.instance_.horizon.obstacles[0]; let type = obj.typeConfig.type; let speed = Runner.instance_.currentSpeed; if (dist < speed * 22) { if (type === 'PTERODACTYL' && obj.yPos < 60) { if(!Runner.instance_.tRex.ducking) Runner.instance_.tRex.setDuck(true); } else { if(Runner.instance_.tRex.ducking) Runner.instance_.tRex.setDuck(false); Runner.instance_.tRex.startJump(Runner.instance_.currentSpeed); } } } requestAnimationFrame(dinoAI); } dinoAI(); ``` ## 補充內容 <!-- 課程網站推廣:[橘子蘋果](https://koding.school/) --> 1. [Google Dino AI](https://docs.google.com/document/d/18ldQEQKfkJ0VeI98WHMRXRZwoGFsQo0Kqw1X3Rsac8U/edit) 2. [Genetic Car](https://rednuht.org/genetic_cars_2/)
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up