Click here for free DL of the app version that can save data.
No:19366 65
Prev Next
A game where you tap the cat which will appear eve..ALL
Developer User8566|Date and time 23/10/3 8:21:17
Build time 13.581 sec|Game capacity 3.349KB|Script


Sure! Here's an example of a simple game where you need to tap the cat within 30 seconds to win. The cat will also move to a different random position each time you tap it. The game ends if you fail to tap the cat within 30 seconds or if you tap the cat 10 times within 50 seconds.


Cat


In this example, the game is played by tapping the cat image, which is displayed within a container. The cat image has an `onclick` attribute that calls the `tapCat()` function when clicked. Each time the cat is tapped, the `tapCount` variable is incremented, and the `moveCat()` function is called to move the cat to a different random position within the game container. The game uses JavaScript `setTimeout()` function to set a timer of 30 seconds (`catTimer = setTimeout(gameOver, 30000)`) after which the `gameOver()` function is called, indicating the game is lost. If the player manages to tap the cat 10 times before the 30-second timer expires, a congratulatory message is displayed (`alertHisa("Congratulations! You win!")`). Please note that you need to replace the `src` attribute of the `<img>` tag with the actual path to your cat image. Also, feel free to adjust the game container's height and width based on your preferences.

Prev Next   Back  1  1 Menu 

[PR]現在の売れ筋グッズランキング

Click here for free DL of the app version that can save data.

(C)2023 HisashiApp