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