From 6f1ba2350dc2f918ad9e65faeb21cbaf1db83fdb Mon Sep 17 00:00:00 2001 From: lucasstarsz Date: Tue, 21 Dec 2021 13:46:16 -0500 Subject: [PATCH] bumped fastj version to 1.6.0-SNAPSHOT-3 --- build.gradle.kts | 16 +++++++++------- src/main/kotlin/tech/fastj/template/Game.kt | 12 ++++++------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 84b3737..8fdf919 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,23 +11,23 @@ plugins { * this, too. */ application /* To create distributable files for your game, we use this runtime plugin. */ - id("org.beryx.runtime") version "1.12.5" + id("org.beryx.runtime") version "1.12.7" } -/* Your project"s group name goes here. +/* Your project's group name goes here. * This should be a domain name you own. - * If you don"t own a domain, don"t worry! You can always set this to "io.github.yourgithubusername". */ + * If you don't own a domain, don"t worry! You can always set this to "io.github.yourgithubusername". */ group = "io.github.yourgithubusername" -/* Your project"s version. +/* Your project's version. * When you want to distribute a new version of your project, always make sure to update the * project version. */ version = "0.0.1" -/* Your project"s description. +/* Your project's description. * Give a one or two sentence description of your project -- if you publish it somewhere, you"ll be * able to use it. */ -description = "A Java Template for FastJ." +description = "A Kotlin Template for FastJ." /* Here, we specify where the main entrypoint of the project. * Feel free to change this as needed. */ @@ -43,7 +43,9 @@ repositories.maven { repositories.mavenCentral() /* The dependency for FastJ, the game engine this template depends on. */ -dependencies.implementation("com.github.fastjengine:FastJ:1.5.0") +dependencies.implementation("com.github.fastjengine:FastJ:1.6.0-SNAPSHOT-3") +/* We'll stick with the simplest logging option for now -- you can change it however you need. */ +dependencies.implementation("org.slf4j:slf4j-simple:2.0.0-alpha3") /* To make Kotlin compile and run properly with Gradle, this adds your Kotlin code to the Java * source sets. */ diff --git a/src/main/kotlin/tech/fastj/template/Game.kt b/src/main/kotlin/tech/fastj/template/Game.kt index f567210..7297f14 100644 --- a/src/main/kotlin/tech/fastj/template/Game.kt +++ b/src/main/kotlin/tech/fastj/template/Game.kt @@ -1,7 +1,7 @@ package tech.fastj.template import tech.fastj.engine.FastJEngine -import tech.fastj.graphics.display.Display +import tech.fastj.graphics.display.FastJCanvas import tech.fastj.graphics.display.RenderSettings import tech.fastj.graphics.game.Text2D import tech.fastj.systems.control.SimpleManager @@ -12,17 +12,17 @@ fun main() { } class Game : SimpleManager() { - override fun init(display: Display?) { + override fun init(canvas: FastJCanvas) { /* Some crispy anti-aliasing for the road. */ - display?.modifyRenderSettings(RenderSettings.Antialiasing.Enable) + canvas.modifyRenderSettings(RenderSettings.Antialiasing.Enable) /* A very simple Text2D object, welcoming you to FastJ! */ - val helloFastJText = Text2D.fromText("Hello, FastJ 1.5.0!") - helloFastJText.translate(display?.screenCenter) + val helloFastJText = Text2D.fromText("Hello, FastJ 1.6.0!") + helloFastJText.translate(canvas.canvasCenter) drawableManager.addGameObject(helloFastJText) } - override fun update(display: Display?) { + override fun update(canvas: FastJCanvas?) { } }