mirror of
https://github.com/nacabaro/vbhelper.git
synced 2026-06-05 22:02:54 +00:00
Adjusted player attack sprite positioning.
This commit is contained in:
parent
c8690152bc
commit
acd990d32b
@ -281,7 +281,7 @@ fun PlayerBattleView(
|
|||||||
|
|
||||||
if (shouldShowAttack) {
|
if (shouldShowAttack) {
|
||||||
val xOffset = when (battleSystem.attackPhase) {
|
val xOffset = when (battleSystem.attackPhase) {
|
||||||
1 -> (attackAnimationProgress * 400 - 200).dp // Player attack on player screen
|
1 -> (attackAnimationProgress * 400 + 50).dp // Player attack on player screen - start and end more to the right
|
||||||
2 -> (attackAnimationProgress * 400 - 200).dp // Player attack on opponent screen
|
2 -> (attackAnimationProgress * 400 - 200).dp // Player attack on opponent screen
|
||||||
4 -> (-attackAnimationProgress * 400 + 200).dp // Opponent attack on player screen
|
4 -> (-attackAnimationProgress * 400 + 200).dp // Opponent attack on player screen
|
||||||
else -> 0.dp
|
else -> 0.dp
|
||||||
@ -466,7 +466,7 @@ fun OpponentBattleView(
|
|||||||
|
|
||||||
if (shouldShowAttack) {
|
if (shouldShowAttack) {
|
||||||
val xOffset = when (battleSystem.attackPhase) {
|
val xOffset = when (battleSystem.attackPhase) {
|
||||||
2 -> (attackAnimationProgress * 400 - 200).dp // Player attack on opponent screen
|
2 -> (attackAnimationProgress * 400 - 350).dp // Player attack on opponent screen - start more to the left
|
||||||
3 -> (-attackAnimationProgress * 400 + 200).dp // Opponent attack on opponent screen
|
3 -> (-attackAnimationProgress * 400 + 200).dp // Opponent attack on opponent screen
|
||||||
else -> 0.dp
|
else -> 0.dp
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user