mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-04 15:27:50 +07:00
Rendering performance improvements - much smoother scrolling!
This commit is contained in:
@ -21,8 +21,8 @@ android {
|
||||
applicationId "com.unciv.app"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 28
|
||||
versionCode 207
|
||||
versionName "2.13.7"
|
||||
versionCode 208
|
||||
versionName "2.13.8"
|
||||
}
|
||||
|
||||
// Had to add this crap for Travis to build, it wanted to sign the app
|
||||
|
@ -13,6 +13,7 @@ class CityTileGroup(private val city: CityInfo, tileInfo: TileInfo) : TileGroup(
|
||||
|
||||
|
||||
init {
|
||||
isTransform=false // performance helper - nothing here is rotated or scaled
|
||||
addActor(yieldGroup)
|
||||
if (city.location == tileInfo.position) {
|
||||
populationImage = ImageGetter.getImage("StatIcons/City_Center_(Civ6).png")
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.unciv.ui.tilegroups
|
||||
|
||||
import com.badlogic.gdx.graphics.Color
|
||||
import com.badlogic.gdx.graphics.g2d.Batch
|
||||
import com.badlogic.gdx.scenes.scene2d.Actor
|
||||
import com.badlogic.gdx.scenes.scene2d.Group
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.Image
|
||||
@ -51,7 +52,7 @@ open class TileGroup(var tileInfo: TileInfo) : Group() {
|
||||
addCircleImage()
|
||||
addFogImage(groupSize)
|
||||
addCrosshairImage()
|
||||
isTransform = false
|
||||
isTransform=false // performance helper - nothing here is rotated or scaled
|
||||
}
|
||||
|
||||
|
||||
@ -287,6 +288,11 @@ open class TileGroup(var tileInfo: TileInfo) : Group() {
|
||||
addActor(image)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
override fun draw(batch: Batch?, parentAlpha: Float) {
|
||||
super.draw(batch, parentAlpha)
|
||||
}
|
||||
|
||||
private fun updateTileColor(isViewable: Boolean) {
|
||||
|
@ -6,6 +6,7 @@ import com.badlogic.gdx.scenes.scene2d.Group
|
||||
class IconCircleGroup(size:Float, val image: Actor): Group(){
|
||||
val circle = ImageGetter.getCircle().apply { setSize(size, size) }
|
||||
init {
|
||||
isTransform=false // performance helper - nothing here is rotated or scaled
|
||||
setSize(size, size)
|
||||
addActor(circle)
|
||||
image.setSize(size * 0.75f, size * 0.75f)
|
||||
|
@ -28,6 +28,8 @@ class UnitGroup(val unit: MapUnit, val size: Float): Group() {
|
||||
if (unit.health < 100) { // add health bar
|
||||
addActor(ImageGetter.getHealthBar(unit.health.toFloat(), 100f, size))
|
||||
}
|
||||
|
||||
isTransform=false // performance helper - nothing here is rotated or scaled
|
||||
}
|
||||
|
||||
fun getBackgroundImageForUnit(unit: MapUnit): Image {
|
||||
|
Reference in New Issue
Block a user