Advertisement
KoctrX

Untitled

Jul 24th, 2023
762
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function terrens() {
  2.     return setInterval(() => {
  3.         const player = game.players[0];
  4.        
  5.         for(const eat of [...game.activeScene.objects.fishes, ...game.activeScene.objects.worms]) {
  6.             player.incrementWeight(eat.params.food);
  7.             game.audio.playSoloAudio(game.activeScene.music.eat);
  8.             game.activeScene.appendPoop(player.fish);
  9.             player.eatFish(eat, isPoopEnd => {
  10.             if (isPoopEnd) {
  11.                 game.activeScene.appendPoop(player.fish);
  12.             } else {
  13.                 game.activeScene.game.audio.playSoloAudio(game.activeScene.music.lvl_up);
  14.             }
  15.             });
  16.            
  17.             game.canvasSwal.eatInfo(eat, player);
  18.             game.activeScene.objectEndAnimation(eat);
  19.             // player.setupSizeByWeight();
  20.             player.fish.eatScaleAnimation(true);
  21.         }
  22.     }, 1000);
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement