From 37e322a631be151bcf8bedeca9481c1c53ec4b34 Mon Sep 17 00:00:00 2001 From: Jack Rainy Date: Sun, 29 Mar 2020 16:31:24 +0300 Subject: [PATCH] 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 --- .../com/unciv/ui/worldscreen/bottombar/BattleTable.kt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/core/src/com/unciv/ui/worldscreen/bottombar/BattleTable.kt b/core/src/com/unciv/ui/worldscreen/bottombar/BattleTable.kt index 76d32e105c..4099d6b3c2 100644 --- a/core/src/com/unciv/ui/worldscreen/bottombar/BattleTable.kt +++ b/core/src/com/unciv/ui/worldscreen/bottombar/BattleTable.kt @@ -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