Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我正在制作一个农业游戏,我想要一个跨度来读取“0 株番茄”并以每秒 4 株番茄的速度计数。我对如何形成这一点一无所知(我对javascript真的很陌生),我在网上找不到任何东西。本质上,我正在尝试制作类似于Candy Box的东西。
setInterval(function(){function_to_plant_4_tomatos()},1000);
检查 setTimeout() 函数。