hit q to close the storage chest gui

This commit is contained in:
minjaesong
2021-08-07 00:27:32 +09:00
parent f7ce911c9e
commit ce9b86d637
6 changed files with 19 additions and 13 deletions

View File

@@ -15,7 +15,11 @@ import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
/**
* Created by minjaesong on 2017-06-10.
*/
class UIBasicInfo(private val player: ActorHumanoid?) : UICanvas() {
class UIBasicInfo() : UICanvas() {
val player: ActorHumanoid?
get() = Terrarum.ingame?.actorNowPlaying
override var width = 93
override var height = 23
override var openCloseTime: Second = 0f
@@ -51,7 +55,7 @@ class UIBasicInfo(private val player: ActorHumanoid?) : UICanvas() {
private val temperature: Int
get() {
if (player != null) {
val playerTilePos = player.hIntTilewiseHitbox
val playerTilePos = player!!.hIntTilewiseHitbox
val tempCelsius = -273f + ((Terrarum.ingame as? TerrarumIngame)?.world?.getTemperature(playerTilePos.centeredX.toInt(), playerTilePos.centeredY.toInt()) ?: 288f)
return if (tempCelsius < -10)