From 0dbfc25385db3df3cfb0d7500e285795f50f4387 Mon Sep 17 00:00:00 2001 From: Tyrannova Date: Thu, 17 Jan 2019 23:20:41 +0100 Subject: birds arent real --- src/main/kotlin/de/romjaki/pluggabledino/api/Emulator.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/de/romjaki/pluggabledino/api/Emulator.kt b/src/main/kotlin/de/romjaki/pluggabledino/api/Emulator.kt index a6e9aeb..04d3c66 100644 --- a/src/main/kotlin/de/romjaki/pluggabledino/api/Emulator.kt +++ b/src/main/kotlin/de/romjaki/pluggabledino/api/Emulator.kt @@ -3,10 +3,13 @@ package de.romjaki.pluggabledino.api import de.romjaki.pluggabledino.game.GameWorld object Emulator { - fun emulate(delta: Float, shouldJump: (GameWorld) -> Boolean): Float { + fun emulate(delta: Float, shouldJump: (GameWorld) -> Boolean, deleteBirds: Boolean): Float { val world = GameWorld() var score = 0f while (!world.hurt) { + if (deleteBirds) { + world.birdd.clear() + } world.update(delta / 1000f, shouldJump(world)) score += delta } -- cgit