mirror of
https://github.com/nacabaro/vbhelper.git
synced 2026-06-05 22:02:54 +00:00
Raised opponent HP bar.
This commit is contained in:
parent
71ba5e0207
commit
c404f4f436
@ -473,12 +473,39 @@ fun OpponentBattleView(
|
|||||||
var previousAttackPhase by remember { mutableStateOf<Int?>(null) }
|
var previousAttackPhase by remember { mutableStateOf<Int?>(null) }
|
||||||
var isTransitioning by remember { mutableStateOf(false) }
|
var isTransitioning by remember { mutableStateOf(false) }
|
||||||
|
|
||||||
|
Box(
|
||||||
|
modifier = Modifier.fillMaxSize()
|
||||||
|
) {
|
||||||
|
// Top section: Enemy HP bar and HP numbers
|
||||||
Column(
|
Column(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.padding(16.dp)
|
||||||
|
) {
|
||||||
|
// Enemy HP bar
|
||||||
|
LinearProgressIndicator(
|
||||||
|
progress = battleSystem.opponentHP / (activeCharacter?.baseHp?.toFloat() ?: 100f),
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.height(10.dp),
|
||||||
|
color = Color.Red,
|
||||||
|
trackColor = Color.Gray
|
||||||
|
)
|
||||||
|
|
||||||
|
// Enemy HP display numbers
|
||||||
|
Text(
|
||||||
|
text = "Enemy HP: ${battleSystem.opponentHP.toInt()}/${activeCharacter?.baseHp ?: 100}",
|
||||||
|
fontSize = 14.sp,
|
||||||
|
color = Color.Black
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Middle section: Opponent Digimon
|
||||||
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.padding(16.dp),
|
.padding(16.dp),
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
contentAlignment = Alignment.Center
|
||||||
verticalArrangement = Arrangement.Center
|
|
||||||
) {
|
) {
|
||||||
// Opponent Digimon
|
// Opponent Digimon
|
||||||
Box(
|
Box(
|
||||||
@ -558,26 +585,7 @@ fun OpponentBattleView(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Enemy HP bar
|
|
||||||
LinearProgressIndicator(
|
|
||||||
progress = battleSystem.opponentHP / (activeCharacter?.baseHp?.toFloat() ?: 100f),
|
|
||||||
modifier = Modifier
|
|
||||||
.fillMaxWidth()
|
|
||||||
.height(10.dp),
|
|
||||||
color = Color.Red,
|
|
||||||
trackColor = Color.Gray
|
|
||||||
)
|
|
||||||
|
|
||||||
// Enemy HP display numbers
|
|
||||||
Text(
|
|
||||||
text = "Enemy HP: ${battleSystem.opponentHP.toInt()}/${activeCharacter?.baseHp ?: 100}",
|
|
||||||
fontSize = 14.sp,
|
|
||||||
color = Color.Black
|
|
||||||
)
|
|
||||||
|
|
||||||
// Spacer for layout balance
|
|
||||||
Spacer(modifier = Modifier.height(120.dp))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user