storage chest still wip

This commit is contained in:
minjaesong
2021-03-13 15:48:14 +09:00
parent d093c2cb30
commit c25e9f92be
11 changed files with 148 additions and 98 deletions

View File

@@ -173,7 +173,7 @@ object IngameRenderer : Disposable {
actorsRenderOverlay: List<ActorWithBody>? = null,
particlesContainer : CircularArray<ParticleBase>? = null,
player: ActorWithBody? = null,
uisToDraw: List<UICanvas?>? = null
uiContainer: UIContainer? = null
) {
renderingActorsCount = (actorsRenderBehind?.size ?: 0) +
(actorsRenderMiddle?.size ?: 0) +
@@ -182,15 +182,9 @@ object IngameRenderer : Disposable {
(actorsRenderOverlay?.size ?: 0)
//renderingParticleCount = particlesContainer?.size ?: 0
//renderingParticleCount = (particlesContainer?.buffer?.map { (!it.flagDespawn).toInt() } ?: listOf(0)).sum()
renderingUIsCount = ((uisToDraw?.map { (it?.isVisible ?: false).toInt() }) ?: listOf(0)).sum()
renderingUIsCount = uiContainer?.countVisible() ?: 0
val zoom = Terrarum.ingame?.screenZoom ?: 1f
if (uisToDraw != null) {
uiListToDraw = uisToDraw
}
invokeInit()
batch.color = Color.WHITE
@@ -331,7 +325,7 @@ object IngameRenderer : Disposable {
batch.shader = null
batch.color = Color.WHITE
uiListToDraw.forEach {
uiContainer?.forEach {
it?.render(batch, camera)
}
}