mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-15 16:16:10 +09:00
+ simply changing the single variable (ingame.world) will update all the renderer's behaviour + somehow my git changelogs are exploding
26 lines
758 B
Kotlin
26 lines
758 B
Kotlin
package net.torvald.terrarum.modulebasegame.console
|
|
|
|
import net.torvald.terrarum.Terrarum
|
|
import net.torvald.terrarum.console.ConsoleCommand
|
|
import net.torvald.terrarum.console.Echo
|
|
import net.torvald.terrarum.modulebasegame.Ingame
|
|
import net.torvald.terrarum.modulebasegame.gameactors.PhysTestLuarLander
|
|
|
|
/**
|
|
* Created by minjaesong on 2018-01-18.
|
|
*/
|
|
internal object SpawnPhysTestLunarLander : ConsoleCommand {
|
|
override fun execute(args: Array<String>) {
|
|
val mouseX = Terrarum.mouseX
|
|
val mouseY = Terrarum.mouseY
|
|
val lander = PhysTestLuarLander()
|
|
|
|
lander.setPosition(mouseX, mouseY)
|
|
|
|
Terrarum.ingame!!.addNewActor(lander)
|
|
}
|
|
|
|
override fun printUsage() {
|
|
Echo("control it with arrow keys")
|
|
}
|
|
} |