mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-17 22:14:05 +09:00
80 fps with unsafe access
This commit is contained in:
@@ -3,6 +3,7 @@ package net.torvald.terrarum
|
||||
import com.badlogic.gdx.Screen
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import com.badlogic.gdx.utils.Queue
|
||||
import net.torvald.terrarum.AppLoader.printdbg
|
||||
import net.torvald.terrarum.gameactors.Actor
|
||||
import net.torvald.terrarum.gameworld.GameWorld
|
||||
import net.torvald.terrarum.modulebasegame.gameactors.ActorHumanoid
|
||||
@@ -74,7 +75,15 @@ open class IngameInstance(val batch: SpriteBatch) : Screen {
|
||||
override fun resize(width: Int, height: Int) {
|
||||
}
|
||||
|
||||
/**
|
||||
* You ABSOLUTELY must call this in your child classes (```super.dispose()```) and the AppLoader to properly
|
||||
* dispose of the world, which uses unsafe memory allocation.
|
||||
* Failing to do this will result to a memory leak!
|
||||
*/
|
||||
override fun dispose() {
|
||||
printdbg(this, "Thank you for properly disposing the world!")
|
||||
|
||||
world.dispose()
|
||||
}
|
||||
|
||||
////////////
|
||||
|
||||
Reference in New Issue
Block a user