Decrease of the battery usage (#2281)

* Decrease battery usage: no animation of damage in the health bar

* Decrease battery usage: no WSAD support for Android

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
This commit is contained in:
Jack Rainy 2020-03-29 16:31:24 +03:00 committed by GitHub
parent 0db473e5bc
commit 37e322a631
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -326,11 +326,12 @@ class BattleTable(val worldScreen: WorldScreen): Table() {
}
addHealthToBar(ImageGetter.getDot(Color.BLACK), maxHealth-currentHealth)
val damagedHealth = ImageGetter.getDot(Color.RED)
damagedHealth.addAction(Actions.repeat(RepeatAction.FOREVER, Actions.sequence(
Actions.color(Color.BLACK,0.7f),
Actions.color(Color.RED,0.7f)
)))
val damagedHealth = ImageGetter.getDot(Color.FIREBRICK)
if (UncivGame.Current.settings.continuousRendering) {
damagedHealth.addAction(Actions.repeat(RepeatAction.FOREVER, Actions.sequence(
Actions.color(Color.BLACK,0.7f),
Actions.color(Color.FIREBRICK,0.7f)
))) }
addHealthToBar(damagedHealth,expectedDamage)
val remainingHealth = currentHealth-expectedDamage