White halo around selected unit is now shield-shaped iff the unit is fortified
This commit is contained in:
parent
5a564f29c3
commit
9cbdee4b12
2 changed files with 8 additions and 7 deletions
|
@ -18,12 +18,13 @@ import com.unciv.ui.utils.center
|
|||
class WorldTileGroup(tileInfo: TileInfo) : TileGroup(tileInfo) {
|
||||
var cityButton: Table? = null
|
||||
|
||||
fun addWhiteCircleAroundUnit(){
|
||||
val whiteCircle = ImageGetter.getImage("UnitIcons/Circle.png")
|
||||
whiteCircle.setSize(25f,25f)
|
||||
whiteCircle.center(unitImage!!)
|
||||
unitImage!!.addActor(whiteCircle)
|
||||
whiteCircle.toBack()
|
||||
fun addWhiteHaloAroundUnit(){
|
||||
val whiteHalo = if(tileInfo.unit!!.isFortified()) ImageGetter.getImage("UnitIcons/Shield.png")
|
||||
else ImageGetter.getImage("UnitIcons/Circle.png")
|
||||
whiteHalo.setSize(25f,25f)
|
||||
whiteHalo.center(unitImage!!)
|
||||
unitImage!!.addActor(whiteHalo)
|
||||
whiteHalo.toBack()
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ class TileMapHolder(internal val worldScreen: WorldScreen, internal val tileMap:
|
|||
|
||||
if(worldScreen.bottomBar.unitTable.selectedUnit!=null){
|
||||
val unit = worldScreen.bottomBar.unitTable.selectedUnit!!
|
||||
tileGroups[unit.getTile()]!!.addWhiteCircleAroundUnit()
|
||||
tileGroups[unit.getTile()]!!.addWhiteHaloAroundUnit()
|
||||
val attackableTiles:List<TileInfo>
|
||||
when(unit.getBaseUnit().unitType){
|
||||
UnitType.Civilian -> return
|
||||
|
|
Loading…
Reference in a new issue