From 7b1f56d5d381ec75e757e7df4714c7acdc3c4803 Mon Sep 17 00:00:00 2001 From: romangraef Date: Fri, 22 Jun 2018 13:50:37 +0200 Subject: plugin api upgrade - run the main code with the args `dev classname` to load this class. - more events in the actual playing - some more API methods --- src/main/kotlin/de/romjaki/pluggabledino/events/GameLostEvent.kt | 5 +++++ .../kotlin/de/romjaki/pluggabledino/events/GameRenderEvent.kt | 9 +++++++++ .../kotlin/de/romjaki/pluggabledino/events/GameUpdateEvent.kt | 8 ++++++++ 3 files changed, 22 insertions(+) create mode 100644 src/main/kotlin/de/romjaki/pluggabledino/events/GameLostEvent.kt create mode 100644 src/main/kotlin/de/romjaki/pluggabledino/events/GameRenderEvent.kt create mode 100644 src/main/kotlin/de/romjaki/pluggabledino/events/GameUpdateEvent.kt (limited to 'src/main/kotlin/de/romjaki/pluggabledino/events') diff --git a/src/main/kotlin/de/romjaki/pluggabledino/events/GameLostEvent.kt b/src/main/kotlin/de/romjaki/pluggabledino/events/GameLostEvent.kt new file mode 100644 index 0000000..cb0ddb9 --- /dev/null +++ b/src/main/kotlin/de/romjaki/pluggabledino/events/GameLostEvent.kt @@ -0,0 +1,5 @@ +package de.romjaki.pluggabledino.events + +import de.romjaki.pluggabledino.api.Event + +data class GameLostEvent(val score: Int) : Event \ No newline at end of file diff --git a/src/main/kotlin/de/romjaki/pluggabledino/events/GameRenderEvent.kt b/src/main/kotlin/de/romjaki/pluggabledino/events/GameRenderEvent.kt new file mode 100644 index 0000000..b2925e7 --- /dev/null +++ b/src/main/kotlin/de/romjaki/pluggabledino/events/GameRenderEvent.kt @@ -0,0 +1,9 @@ +package de.romjaki.pluggabledino.events + +import de.romjaki.pluggabledino.api.Event +import org.newdawn.slick.GameContainer +import org.newdawn.slick.Graphics +import org.newdawn.slick.state.StateBasedGame + + +data class GameRenderEvent(val graphics: Graphics, val game: StateBasedGame, val container: GameContainer) : Event \ No newline at end of file diff --git a/src/main/kotlin/de/romjaki/pluggabledino/events/GameUpdateEvent.kt b/src/main/kotlin/de/romjaki/pluggabledino/events/GameUpdateEvent.kt new file mode 100644 index 0000000..550c853 --- /dev/null +++ b/src/main/kotlin/de/romjaki/pluggabledino/events/GameUpdateEvent.kt @@ -0,0 +1,8 @@ +package de.romjaki.pluggabledino.events + +import de.romjaki.pluggabledino.api.Event +import de.romjaki.pluggabledino.game.GameWorld +import org.newdawn.slick.Game +import org.newdawn.slick.GameContainer + +data class GameUpdateEvent(val game: Game, val delta: Int, val container: GameContainer, val world: GameWorld) : Event \ No newline at end of file -- cgit