Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function terrens() {
- return setInterval(() => {
- const player = game.players[0];
- for(const eat of [...game.activeScene.objects.fishes, ...game.activeScene.objects.worms]) {
- player.incrementWeight(eat.params.food);
- game.audio.playSoloAudio(game.activeScene.music.eat);
- game.activeScene.appendPoop(player.fish);
- player.eatFish(eat, isPoopEnd => {
- if (isPoopEnd) {
- game.activeScene.appendPoop(player.fish);
- } else {
- game.activeScene.game.audio.playSoloAudio(game.activeScene.music.lvl_up);
- }
- });
- game.canvasSwal.eatInfo(eat, player);
- game.activeScene.objectEndAnimation(eat);
- // player.setupSizeByWeight();
- player.fish.eatScaleAnimation(true);
- }
- }, 1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement