mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-14 09:48:12 +07:00
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:
@ -326,11 +326,12 @@ class BattleTable(val worldScreen: WorldScreen): Table() {
|
|||||||
}
|
}
|
||||||
addHealthToBar(ImageGetter.getDot(Color.BLACK), maxHealth-currentHealth)
|
addHealthToBar(ImageGetter.getDot(Color.BLACK), maxHealth-currentHealth)
|
||||||
|
|
||||||
val damagedHealth = ImageGetter.getDot(Color.RED)
|
val damagedHealth = ImageGetter.getDot(Color.FIREBRICK)
|
||||||
damagedHealth.addAction(Actions.repeat(RepeatAction.FOREVER, Actions.sequence(
|
if (UncivGame.Current.settings.continuousRendering) {
|
||||||
Actions.color(Color.BLACK,0.7f),
|
damagedHealth.addAction(Actions.repeat(RepeatAction.FOREVER, Actions.sequence(
|
||||||
Actions.color(Color.RED,0.7f)
|
Actions.color(Color.BLACK,0.7f),
|
||||||
)))
|
Actions.color(Color.FIREBRICK,0.7f)
|
||||||
|
))) }
|
||||||
addHealthToBar(damagedHealth,expectedDamage)
|
addHealthToBar(damagedHealth,expectedDamage)
|
||||||
|
|
||||||
val remainingHealth = currentHealth-expectedDamage
|
val remainingHealth = currentHealth-expectedDamage
|
||||||
|
Reference in New Issue
Block a user