still wip modularisation, game somehow boots

This commit is contained in:
minjaesong
2018-06-21 17:33:22 +09:00
parent f0a6f8b9c2
commit a6ea2b4e18
266 changed files with 2409 additions and 1122 deletions

View File

@@ -6,6 +6,7 @@ import net.torvald.terrarum.worlddrawer.BlocksDrawer
import net.torvald.terrarum.worlddrawer.FeaturesDrawer
import net.torvald.terrarum.Terrarum
import com.jme3.math.FastMath
import net.torvald.terrarum.modulebasegame.Ingame
import java.util.Arrays
@@ -26,8 +27,8 @@ object BlockStats {
// Get stats on no-zoomed screen area. In other words, will behave as if screen zoom were 1.0
// no matter how the screen is zoomed.
val map = Terrarum.ingame!!.world
val player = Terrarum.ingame!!.player
val map = (Terrarum.ingame!! as Ingame).world
val player = (Terrarum.ingame!! as Ingame).player
val renderWidth = FastMath.ceil(Terrarum.WIDTH.toFloat())
val renderHeight = FastMath.ceil(Terrarum.HEIGHT.toFloat())