Testing out JmonkeyEngine to make a game in Scala with Akka Actors within a pure FP layer
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
// @file:Import("src/main/resources/hello2.main.kts") @file:DependsOn("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.0-M1") @file:DependsOn("/home/rohan/.m2/repository/wow/doge/game/1.0-SNAPSHOT/game-1.0-SNAPSHOT.jar") @file:DependsOn("/home/rohan/.ivy2/local/wow.doge/mygame_2.13/1.0-SNAPSHOT/jars/mygame_2.13.jar")
import wow.doge.game.types.GameScript
import kotlinx.coroutines.delay import kotlinx.coroutines.launch import kotlinx.coroutines.runBlocking import kotlin.random.Random
import wow.doge.mygame.components.Test
//println(x * 2)
println("hello from main script")
class GameScriptImpl : GameScript { override fun start() = runBlocking { for(x in 0 until 5) { launch { val del = Random.nextLong(20, 100)
delay(del) println("hello from start $x, delay is $del") } } } override fun stop() {println("hello from stop")} }
GameScriptImpl()
class MyTest : Test()
|