ja s'ha liat la cosa per no fer pull, ostia

This commit is contained in:
2025-07-24 14:00:05 +02:00
parent 55d5957ff0
commit fa6fbeb09c
8 changed files with 298 additions and 284 deletions

View File

@@ -3,275 +3,275 @@
# Variables disponibles: # Variables disponibles:
# X1_0, X1_50, X1_100, X2_0, X2_100, X3_0, X3_100, X4_0, X4_100 # X1_0, X1_50, X1_100, X2_0, X2_100, X3_0, X3_100, X4_0, X4_100
# QUARTER1_X4, QUARTER3_X4, DEFAULT_POS_Y # QUARTER1_X4, QUARTER3_X4, DEFAULT_POS_Y
# SIZE_0, SIZE_1, SIZE_2, SIZE_3 # SMALL, MEDIUM, LARGE, EXTRALARGE
# RIGHT, LEFT # RIGHT, LEFT
formation: 0 formation: 0
# Dos enemigos BALLOON3 uno a cada extremo # Dos enemigos BALLOON3 uno a cada extremo
X4_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_3, 0 X4_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, EXTRALARGE, 0
X4_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_3, 0 X4_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, EXTRALARGE, 0
formation: 1 formation: 1
# Dos enemigos BALLOON3 uno a cada cuarto. Ambos van hacia el centro # Dos enemigos BALLOON3 uno a cada cuarto. Ambos van hacia el centro
QUARTER1_X4, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_3, 0 QUARTER1_X4, 0, DEFAULT_POS_Y, RIGHT, BALLOON, EXTRALARGE, 0
QUARTER3_X4, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_3, 0 QUARTER3_X4, 0, DEFAULT_POS_Y, LEFT, BALLOON, EXTRALARGE, 0
formation: 2 formation: 2
# Cuatro enemigos BALLOON1 uno detrás del otro. A la izquierda y hacia el centro # Cuatro enemigos BALLOON1 uno detrás del otro. A la izquierda y hacia el centro
X2_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_1, 30 X2_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 30
X2_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_1, 20 X2_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 20
X2_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_1, 10 X2_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 10
X2_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_1, 0 X2_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 0
formation: 3 formation: 3
# Cuatro enemigos BALLOON1 uno detrás del otro. A la derecha y hacia el centro # Cuatro enemigos BALLOON1 uno detrás del otro. A la derecha y hacia el centro
X2_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_1, 30 X2_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 30
X2_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_1, 20 X2_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 20
X2_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_1, 10 X2_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 10
X2_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_1, 0 X2_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 0
formation: 4 formation: 4
# Tres enemigos BALLOON2. 0, 25, 50. Hacia la derecha # Tres enemigos BALLOON2. 0, 25, 50. Hacia la derecha
X3_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 20 X3_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 20
X3_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 10 X3_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 10
X3_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 0 X3_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0
formation: 5 formation: 5
# Tres enemigos BALLOON2. 50, 75, 100. Hacia la izquierda # Tres enemigos BALLOON2. 50, 75, 100. Hacia la izquierda
X3_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 20 X3_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 20
X3_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 10 X3_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 10
X3_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 0 X3_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0
formation: 6 formation: 6
# Tres enemigos BALLOON2. 0, 0, 0. Hacia la derecha # Tres enemigos BALLOON2. 0, 0, 0. Hacia la derecha
X3_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 20 X3_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 20
X3_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 10 X3_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 10
X3_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 0 X3_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0
formation: 7 formation: 7
# Tres enemigos BALLOON2. 100, 100, 100. Hacia la izquierda # Tres enemigos BALLOON2. 100, 100, 100. Hacia la izquierda
X3_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 20 X3_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 20
X3_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 10 X3_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 10
X3_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 0 X3_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0
formation: 8 formation: 8
# Seis enemigos BALLOON0. 0, 0, 0, 0, 0, 0. Hacia la derecha # Seis enemigos BALLOON0. 0, 0, 0, 0, 0, 0. Hacia la derecha
X1_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 50 X1_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 50
X1_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 40 X1_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 40
X1_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 30 X1_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 30
X1_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 20 X1_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 20
X1_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 10 X1_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 10
X1_0, 5, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 0 X1_0, 5, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0
formation: 9 formation: 9
# Seis enemigos BALLOON0. 100, 100, 100, 100, 100, 100. Hacia la izquierda # Seis enemigos BALLOON0. 100, 100, 100, 100, 100, 100. Hacia la izquierda
X1_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 50 X1_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 50
X1_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 40 X1_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 40
X1_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 30 X1_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 30
X1_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 20 X1_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 20
X1_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 10 X1_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 10
X1_100, -5, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 0 X1_100, -5, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0
formation: 10 formation: 10
# Tres enemigos BALLOON3 seguidos desde la izquierda. Hacia la derecha # Tres enemigos BALLOON3 seguidos desde la izquierda. Hacia la derecha
X4_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_3, 30 X4_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, EXTRALARGE, 30
X4_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_3, 15 X4_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, EXTRALARGE, 15
X4_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_3, 0 X4_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, EXTRALARGE, 0
formation: 11 formation: 11
# Tres enemigos BALLOON3 seguidos desde la derecha. Hacia la izquierda # Tres enemigos BALLOON3 seguidos desde la derecha. Hacia la izquierda
X4_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_3, 30 X4_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, EXTRALARGE, 30
X4_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_3, 15 X4_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, EXTRALARGE, 15
X4_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_3, 0 X4_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, EXTRALARGE, 0
formation: 12 formation: 12
# Seis enemigos BALLOON1 uno detrás del otro. A la izquierda y hacia el centro # Seis enemigos BALLOON1 uno detrás del otro. A la izquierda y hacia el centro
X2_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_1, 50 X2_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 50
X2_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_1, 40 X2_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 40
X2_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_1, 30 X2_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 30
X2_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_1, 20 X2_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 20
X2_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_1, 10 X2_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 10
X2_0, 5, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_1, 0 X2_0, 5, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 0
formation: 13 formation: 13
# Seis enemigos BALLOON1 uno detrás del otro. A la derecha y hacia el centro # Seis enemigos BALLOON1 uno detrás del otro. A la derecha y hacia el centro
X2_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_1, 50 X2_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 50
X2_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_1, 40 X2_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 40
X2_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_1, 30 X2_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 30
X2_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_1, 20 X2_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 20
X2_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_1, 10 X2_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 10
X2_100, -5, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_1, 0 X2_100, -5, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 0
formation: 14 formation: 14
# Cinco enemigos BALLOON2. Hacia la derecha. Separados # Cinco enemigos BALLOON2. Hacia la derecha. Separados
X3_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 40 X3_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 40
X3_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 30 X3_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 30
X3_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 20 X3_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 20
X3_0, 6, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 10 X3_0, 6, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 10
X3_0, 8, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 0 X3_0, 8, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0
formation: 15 formation: 15
# Cinco enemigos BALLOON2. Hacia la izquierda. Separados # Cinco enemigos BALLOON2. Hacia la izquierda. Separados
X3_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 40 X3_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 40
X3_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 30 X3_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 30
X3_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 20 X3_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 20
X3_100, -6, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 10 X3_100, -6, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 10
X3_100, -8, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 0 X3_100, -8, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0
formation: 16 formation: 16
# Cinco enemigos BALLOON2. Hacia la derecha. Juntos # Cinco enemigos BALLOON2. Hacia la derecha. Juntos
X3_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 40 X3_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 40
X3_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 30 X3_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 30
X3_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 20 X3_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 20
X3_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 10 X3_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 10
X3_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 0 X3_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0
formation: 17 formation: 17
# Cinco enemigos BALLOON2. Hacia la izquierda. Juntos # Cinco enemigos BALLOON2. Hacia la izquierda. Juntos
X3_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 40 X3_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 40
X3_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 30 X3_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 30
X3_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 20 X3_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 20
X3_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 10 X3_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 10
X3_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 0 X3_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0
formation: 18 formation: 18
# Doce enemigos BALLOON0. Hacia la derecha. Juntos # Doce enemigos BALLOON0. Hacia la derecha. Juntos
X1_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 110 X1_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 110
X1_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 100 X1_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 100
X1_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 90 X1_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 90
X1_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 80 X1_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 80
X1_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 70 X1_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 70
X1_0, 5, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 60 X1_0, 5, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 60
X1_0, 6, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 50 X1_0, 6, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 50
X1_0, 7, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 40 X1_0, 7, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 40
X1_0, 8, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 30 X1_0, 8, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 30
X1_0, 9, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 20 X1_0, 9, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 20
X1_0, 10, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 10 X1_0, 10, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 10
X1_0, 11, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 0 X1_0, 11, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0
formation: 19 formation: 19
# Doce enemigos BALLOON0. Hacia la izquierda. Juntos # Doce enemigos BALLOON0. Hacia la izquierda. Juntos
X1_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 110 X1_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 110
X1_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 100 X1_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 100
X1_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 90 X1_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 90
X1_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 80 X1_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 80
X1_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 70 X1_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 70
X1_100, -5, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 60 X1_100, -5, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 60
X1_100, -6, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 50 X1_100, -6, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 50
X1_100, -7, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 40 X1_100, -7, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 40
X1_100, -8, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 30 X1_100, -8, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 30
X1_100, -9, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 20 X1_100, -9, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 20
X1_100, -10, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 10 X1_100, -10, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 10
X1_100, -11, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 0 X1_100, -11, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0
formation: 20 formation: 20
# Cuatro enemigos BALLOON3 seguidos desde la izquierda/derecha. Simétricos # Cuatro enemigos BALLOON3 seguidos desde la izquierda/derecha. Simétricos
X4_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_3, 0 X4_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, EXTRALARGE, 0
X4_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_3, 0 X4_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, EXTRALARGE, 0
X4_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_3, 0 X4_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, EXTRALARGE, 0
X4_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_3, 0 X4_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, EXTRALARGE, 0
formation: 21 formation: 21
# Diez enemigos BALLOON1 uno detrás del otro. Izquierda/derecha. Simétricos # Diez enemigos BALLOON1 uno detrás del otro. Izquierda/derecha. Simétricos
X2_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_1, 12 X2_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 12
X2_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_1, 9 X2_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 9
X2_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_1, 6 X2_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 6
X2_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_1, 3 X2_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 3
X2_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_1, 0 X2_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, MEDIUM, 0
X2_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_1, 12 X2_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 12
X2_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_1, 9 X2_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 9
X2_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_1, 6 X2_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 6
X2_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_1, 3 X2_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 3
X2_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_1, 0 X2_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, MEDIUM, 0
formation: 22 formation: 22
# Diez enemigos BALLOON2. Hacia la derecha/izquierda. Separados. Simétricos # Diez enemigos BALLOON2. Hacia la derecha/izquierda. Separados. Simétricos
X3_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 40 X3_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 40
X3_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 30 X3_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 30
X3_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 20 X3_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 20
X3_0, 6, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 10 X3_0, 6, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 10
X3_0, 8, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 0 X3_0, 8, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0
X3_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 40 X3_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 40
X3_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 30 X3_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 30
X3_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 20 X3_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 20
X3_100, -6, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 10 X3_100, -6, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 10
X3_100, -8, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 0 X3_100, -8, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0
formation: 23 formation: 23
# Diez enemigos BALLOON2. Hacia la derecha. Juntos. Simétricos # Diez enemigos BALLOON2. Hacia la derecha. Juntos. Simétricos
X3_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 40 X3_0, 0, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 40
X3_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 30 X3_0, 1, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 30
X3_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 20 X3_0, 2, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 20
X3_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 10 X3_0, 3, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 10
X3_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_2, 0 X3_0, 4, DEFAULT_POS_Y, RIGHT, BALLOON, LARGE, 0
X3_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 40 X3_100, 0, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 40
X3_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 30 X3_100, -1, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 30
X3_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 20 X3_100, -2, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 20
X3_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 10 X3_100, -3, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 10
X3_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_2, 0 X3_100, -4, DEFAULT_POS_Y, LEFT, BALLOON, LARGE, 0
formation: 24 formation: 24
# Treinta enemigos BALLOON0. Del centro hacia los extremos. Juntos. Simétricos # Treinta enemigos BALLOON0. Del centro hacia los extremos. Juntos. Simétricos
X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 0 X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0
X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 5 X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 5
X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 10 X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 10
X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 15 X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 15
X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 20 X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 20
X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 25 X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 25
X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 30 X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 30
X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 35 X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 35
X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 40 X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 40
X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 45 X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 45
X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 50 X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 50
X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 55 X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 55
X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 60 X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 60
X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 65 X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 65
X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 70 X1_50, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 70
X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 0 X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0
X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 5 X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 5
X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 10 X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 10
X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 15 X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 15
X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 20 X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 20
X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 25 X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 25
X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 30 X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 30
X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 35 X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 35
X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 40 X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 40
X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 45 X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 45
X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 50 X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 50
X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 55 X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 55
X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 60 X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 60
X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 65 X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 65
X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 70 X1_50, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 70
formation: 25 formation: 25
# Treinta enemigos BALLOON0. Del centro hacia adentro. Juntos. Simétricos # Treinta enemigos BALLOON0. Del centro hacia adentro. Juntos. Simétricos
X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 70 X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 70
X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 65 X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 65
X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 60 X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 60
X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 55 X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 55
X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 50 X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 50
X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 45 X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 45
X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 40 X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 40
X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 35 X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 35
X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 30 X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 30
X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 25 X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 25
X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 20 X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 20
X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 15 X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 15
X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 10 X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 10
X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 5 X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 5
X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SIZE_0, 0 X1_50 + 20, 0, DEFAULT_POS_Y, LEFT, BALLOON, SMALL, 0
X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 70 X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 70
X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 65 X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 65
X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 60 X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 60
X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 55 X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 55
X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 50 X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 50
X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 45 X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 45
X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 40 X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 40
X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 35 X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 35
X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 30 X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 30
X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 25 X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 25
X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 20 X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 20
X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 15 X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 15
X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 10 X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 10
X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 5 X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 5
X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SIZE_0, 0 X1_50 - 20, 0, DEFAULT_POS_Y, RIGHT, BALLOON, SMALL, 0

View File

@@ -33,12 +33,12 @@ Balloon::Balloon(float x, float y, Type type, Size size, float vel_x, float spee
const int INDEX = static_cast<int>(size_); const int INDEX = static_cast<int>(size_);
gravity_ = param.balloon.settings.at(INDEX).grav; gravity_ = param.balloon.settings.at(INDEX).grav;
default_vy_ = param.balloon.settings.at(INDEX).vel; default_vy_ = param.balloon.settings.at(INDEX).vel;
h_ = w_ = SIZE[INDEX]; h_ = w_ = SIZE.at(INDEX);
power_ = POWER[INDEX]; power_ = POWER.at(INDEX);
menace_ = MENACE[INDEX]; menace_ = MENACE.at(INDEX);
score_ = SCORE[INDEX]; score_ = SCORE.at(INDEX);
bouncing_sound_ = BOUNCING_SOUND[INDEX]; bouncing_sound_ = BOUNCING_SOUND.at(INDEX);
popping_sound_ = POPPING_SOUND[INDEX]; popping_sound_ = POPPING_SOUND.at(INDEX);
break; break;
} }
@@ -48,20 +48,20 @@ Balloon::Balloon(float x, float y, Type type, Size size, float vel_x, float spee
gravity_ = 0.00F; gravity_ = 0.00F;
const int INDEX = static_cast<int>(size_); const int INDEX = static_cast<int>(size_);
h_ = w_ = SIZE[INDEX]; h_ = w_ = SIZE.at(INDEX);
power_ = POWER[INDEX]; power_ = POWER.at(INDEX);
menace_ = MENACE[INDEX]; menace_ = MENACE.at(INDEX);
score_ = SCORE[INDEX]; score_ = SCORE.at(INDEX);
bouncing_sound_ = BOUNCING_SOUND[INDEX]; bouncing_sound_ = BOUNCING_SOUND.at(INDEX);
popping_sound_ = POPPING_SOUND[INDEX]; popping_sound_ = POPPING_SOUND.at(INDEX);
break; break;
} }
case Type::POWERBALL: { case Type::POWERBALL: {
constexpr int INDEX = 3; constexpr int INDEX = 3;
h_ = w_ = SIZE[4]; h_ = w_ = SIZE.at(4);
bouncing_sound_ = BOUNCING_SOUND[3]; bouncing_sound_ = BOUNCING_SOUND.at(3);
popping_sound_ = "power_ball_explosion.wav"; popping_sound_ = "power_ball_explosion.wav";
power_ = score_ = menace_ = 0; power_ = score_ = menace_ = 0;
@@ -107,7 +107,7 @@ void Balloon::render() {
// Renderiza el fondo azul // Renderiza el fondo azul
{ {
auto sp = std::make_unique<Sprite>(sprite_->getTexture(), sprite_->getPosition()); auto sp = std::make_unique<Sprite>(sprite_->getTexture(), sprite_->getPosition());
sp->setSpriteClip(0, 0, SIZE[4], SIZE[4]); sp->setSpriteClip(0, 0, SIZE.at(4), SIZE.at(4));
sp->render(); sp->render();
} }
@@ -121,7 +121,7 @@ void Balloon::render() {
// Añade la máscara del borde y los reflejos // Añade la máscara del borde y los reflejos
{ {
auto sp = std::make_unique<Sprite>(sprite_->getTexture(), sprite_->getPosition()); auto sp = std::make_unique<Sprite>(sprite_->getTexture(), sprite_->getPosition());
sp->setSpriteClip(SIZE[4] * 2, 0, SIZE[4], SIZE[4]); sp->setSpriteClip(SIZE.at(4) * 2, 0, SIZE.at(4), SIZE.at(4));
sp->render(); sp->render();
} }
} else { } else {
@@ -352,7 +352,7 @@ void Balloon::applyBounceEffect() {
// Activa el efecto // Activa el efecto
void Balloon::enableBounceEffect() { void Balloon::enableBounceEffect() {
// Los globos pequeños no tienen efecto de rebote // Los globos pequeños no tienen efecto de rebote
if (size_ == Size::SIZE_0) { if (size_ == Size::SMALL) {
return; return;
} }
bounce_effect_.enabled = true; bounce_effect_.enabled = true;
@@ -371,8 +371,8 @@ void Balloon::disableBounceEffect() {
void Balloon::updateBounceEffect() { void Balloon::updateBounceEffect() {
if (bounce_effect_.enabled) { if (bounce_effect_.enabled) {
const int INDEX = bounce_effect_.counter / bounce_effect_.speed; const int INDEX = bounce_effect_.counter / bounce_effect_.speed;
bounce_effect_.horizontal_zoom = bounce_effect_.horizontal_zoom_values[INDEX]; bounce_effect_.horizontal_zoom = bounce_effect_.horizontal_zoom_values.at(INDEX);
bounce_effect_.verical_zoom = bounce_effect_.vertical_zoom_values[INDEX]; bounce_effect_.verical_zoom = bounce_effect_.vertical_zoom_values.at(INDEX);
applyBounceEffect(); applyBounceEffect();

View File

@@ -42,10 +42,10 @@ class Balloon {
static constexpr int POWERBALL_COUNTER = 8; static constexpr int POWERBALL_COUNTER = 8;
enum class Size : Uint8 { enum class Size : Uint8 {
SIZE_0 = 0, SMALL = 0,
SIZE_1 = 1, MEDIUM = 1,
SIZE_2 = 2, LARGE = 2,
SIZE_3 = 3, EXTRALARGE = 3,
}; };
enum class Type : Uint8 { enum class Type : Uint8 {

View File

@@ -11,7 +11,7 @@
#include <string> // Para allocator, char_traits, operator==, string, operator<=>, basic_string, stoi, getline #include <string> // Para allocator, char_traits, operator==, string, operator<=>, basic_string, stoi, getline
#include "asset.h" // Para Asset #include "asset.h" // Para Asset
#include "balloon.h" // Para BALLOON_SIZE, BalloonSize, BalloonType, BALLOON_VELX_NEGATIVE, BALLOON_VELX_POSITIVE #include "balloon.h" // Para Balloon::SIZE, Balloon::Size, Balloon::Type, Balloon::VELX_NEGATIVE, Balloon::VELX_POSITIVE
#include "param.h" // Para Param, ParamGame, param #include "param.h" // Para Param, ParamGame, param
#include "utils.h" // Para Zone, BLOCK #include "utils.h" // Para Zone, BLOCK
@@ -20,18 +20,18 @@ void BalloonFormations::initFormations() {
const int DEFAULT_POS_Y = param.game.play_area.rect.h - BALLOON_SPAWN_HEIGHT; const int DEFAULT_POS_Y = param.game.play_area.rect.h - BALLOON_SPAWN_HEIGHT;
const int X4_0 = param.game.play_area.rect.x; const int X4_0 = param.game.play_area.rect.x;
const int X4_100 = param.game.play_area.rect.w - BALLOON_SIZE.at(3); const int X4_100 = param.game.play_area.rect.w - Balloon::SIZE.at(3);
const int X3_0 = param.game.play_area.rect.x; const int X3_0 = param.game.play_area.rect.x;
const int X3_100 = param.game.play_area.rect.w - BALLOON_SIZE.at(2); const int X3_100 = param.game.play_area.rect.w - Balloon::SIZE.at(2);
const int X2_0 = param.game.play_area.rect.x; const int X2_0 = param.game.play_area.rect.x;
const int X2_100 = param.game.play_area.rect.w - BALLOON_SIZE.at(1); const int X2_100 = param.game.play_area.rect.w - Balloon::SIZE.at(1);
const int X1_0 = param.game.play_area.rect.x; const int X1_0 = param.game.play_area.rect.x;
const int X1_50 = param.game.play_area.center_x - (BALLOON_SIZE.at(0) / 2); const int X1_50 = param.game.play_area.center_x - (Balloon::SIZE.at(0) / 2);
const int X1_100 = param.game.play_area.rect.w - BALLOON_SIZE.at(0); const int X1_100 = param.game.play_area.rect.w - Balloon::SIZE.at(0);
// Variables calculadas para posiciones especiales // Variables calculadas para posiciones especiales
const int QUARTER1_X4 = param.game.play_area.first_quarter_x - (BALLOON_SIZE.at(3) / 2); const int QUARTER1_X4 = param.game.play_area.first_quarter_x - (Balloon::SIZE.at(3) / 2);
const int QUARTER3_X4 = param.game.play_area.third_quarter_x - (BALLOON_SIZE.at(3) / 2); const int QUARTER3_X4 = param.game.play_area.third_quarter_x - (Balloon::SIZE.at(3) / 2);
// Mapa de variables para reemplazar en el archivo // Mapa de variables para reemplazar en el archivo
std::map<std::string, float> variables = { std::map<std::string, float> variables = {
@@ -47,12 +47,12 @@ void BalloonFormations::initFormations() {
{"QUARTER1_X4", QUARTER1_X4}, {"QUARTER1_X4", QUARTER1_X4},
{"QUARTER3_X4", QUARTER3_X4}, {"QUARTER3_X4", QUARTER3_X4},
{"DEFAULT_POS_Y", DEFAULT_POS_Y}, {"DEFAULT_POS_Y", DEFAULT_POS_Y},
{"BALLOON_SIZE_0", BALLOON_SIZE.at(0)}, {"BALLOON_SIZE_0", Balloon::SIZE.at(0)},
{"BALLOON_SIZE_1", BALLOON_SIZE.at(1)}, {"BALLOON_SIZE_1", Balloon::SIZE.at(1)},
{"BALLOON_SIZE_2", BALLOON_SIZE.at(2)}, {"BALLOON_SIZE_2", Balloon::SIZE.at(2)},
{"BALLOON_SIZE_3", BALLOON_SIZE.at(3)}, {"BALLOON_SIZE_3", Balloon::SIZE.at(3)},
{"RIGHT", BALLOON_VELX_POSITIVE}, {"RIGHT", Balloon::VELX_POSITIVE},
{"LEFT", BALLOON_VELX_NEGATIVE}}; {"LEFT", Balloon::VELX_NEGATIVE}};
balloon_formation_.reserve(NUMBER_OF_BALLOON_FORMATIONS); balloon_formation_.reserve(NUMBER_OF_BALLOON_FORMATIONS);
@@ -111,8 +111,10 @@ auto BalloonFormations::loadFormationsFromFile(const std::string& filename, cons
// Crear variantes flotantes (formaciones 50-99) // Crear variantes flotantes (formaciones 50-99)
createFloaterVariants(); createFloaterVariants();
#ifdef _DEBUG
// Añadir formación de prueba // Añadir formación de prueba
addTestFormation(); addTestFormation();
#endif
file.close(); file.close();
return true; return true;
@@ -138,21 +140,21 @@ auto BalloonFormations::parseBalloonLine(const std::string& line, const std::map
int y = evaluateExpression(tokens.at(2), variables); int y = evaluateExpression(tokens.at(2), variables);
float vel_x = evaluateExpression(tokens.at(3), variables); float vel_x = evaluateExpression(tokens.at(3), variables);
BalloonType type = (tokens.at(4) == "BALLOON") ? BalloonType::BALLOON : BalloonType::FLOATER; Balloon::Type type = (tokens.at(4) == "BALLOON") ? Balloon::Type::BALLOON : Balloon::Type::FLOATER;
BalloonSize size; Balloon::Size size;
if (tokens.at(5) == "SIZE_0") { if (tokens.at(5) == "SMALL") {
size = BalloonSize::SIZE_0; size = Balloon::Size::SMALL;
desp = desp * (BALLOON_SIZE.at(0) + 1); desp = desp * (Balloon::SIZE.at(0) + 1);
} else if (tokens.at(5) == "SIZE_1") { } else if (tokens.at(5) == "MEDIUM") {
size = BalloonSize::SIZE_1; size = Balloon::Size::MEDIUM;
desp = desp * (BALLOON_SIZE.at(1) + 1); desp = desp * (Balloon::SIZE.at(1) + 1);
} else if (tokens.at(5) == "SIZE_2") { } else if (tokens.at(5) == "LARGE") {
size = BalloonSize::SIZE_2; size = Balloon::Size::LARGE;
desp = desp * (BALLOON_SIZE.at(2) + 1); desp = desp * (Balloon::SIZE.at(2) + 1);
} else if (tokens.at(5) == "SIZE_3") { } else if (tokens.at(5) == "EXTRALARGE") {
size = BalloonSize::SIZE_3; size = Balloon::Size::EXTRALARGE;
desp = desp * (BALLOON_SIZE.at(3) + 1); desp = desp * (Balloon::SIZE.at(3) + 1);
} else { } else {
return std::nullopt; return std::nullopt;
} }
@@ -230,36 +232,36 @@ void BalloonFormations::createFloaterVariants() {
for (int i = 0; i < balloon_formation_.at(k).number_of_balloons; i++) { for (int i = 0; i < balloon_formation_.at(k).number_of_balloons; i++) {
const auto& original = balloon_formation_.at(k).init.at(i); const auto& original = balloon_formation_.at(k).init.at(i);
floater_params.emplace_back( floater_params.emplace_back(
original.x, original.y, original.vel_x, BalloonType::FLOATER, original.size, original.creation_counter); original.x, original.y, original.vel_x, Balloon::Type::FLOATER, original.size, original.creation_counter);
} }
balloon_formation_.at(k + 50) = BalloonFormationUnit( balloon_formation_.at(k + 50) = BalloonFormationUnit(
balloon_formation_.at(k).number_of_balloons, floater_params); balloon_formation_.at(k).number_of_balloons, floater_params);
} }
} }
#ifdef _DEBUG
void BalloonFormations::addTestFormation() { void BalloonFormations::addTestFormation() {
std::vector<BalloonFormationParams> test_params = { std::vector<BalloonFormationParams> test_params = {
{10, -BLOCK, 0, BalloonType::FLOATER, BalloonSize::SIZE_0, 200}, {10, -BLOCK, 0, Balloon::Type::FLOATER, Balloon::Size::SMALL, 200},
{50, -BLOCK, 0, BalloonType::FLOATER, BalloonSize::SIZE_1, 200}, {50, -BLOCK, 0, Balloon::Type::FLOATER, Balloon::Size::MEDIUM, 200},
{90, -BLOCK, 0, BalloonType::FLOATER, BalloonSize::SIZE_2, 200}, {90, -BLOCK, 0, Balloon::Type::FLOATER, Balloon::Size::LARGE, 200},
{140, -BLOCK, 0, BalloonType::FLOATER, BalloonSize::SIZE_3, 200}}; {140, -BLOCK, 0, Balloon::Type::FLOATER, Balloon::Size::EXTRALARGE, 200}};
balloon_formation_.at(99) = BalloonFormationUnit(4, test_params); balloon_formation_.at(99) = BalloonFormationUnit(4, test_params);
} }
#endif
void BalloonFormations::loadDefaultFormations() { void BalloonFormations::loadDefaultFormations() {
// Código de fallback con algunas formaciones básicas hardcodeadas // Código de fallback con algunas formaciones básicas hardcodeadas
// para que el juego funcione aunque falle la carga del archivo // para que el juego funcione aunque falle la carga del archivo
const int DEFAULT_POS_Y = param.game.play_area.rect.h - BALLOON_SPAWN_HEIGHT; const int DEFAULT_POS_Y = param.game.play_area.rect.h - BALLOON_SPAWN_HEIGHT;
const int X4_0 = param.game.play_area.rect.x; const int X4_0 = param.game.play_area.rect.x;
const int X4_100 = param.game.play_area.rect.w - BALLOON_SIZE.at(3); const int X4_100 = param.game.play_area.rect.w - Balloon::SIZE.at(3);
// Formación básica #00 // Formación básica #00
std::vector<BalloonFormationParams> basic_formation = { std::vector<BalloonFormationParams> basic_formation = {
BalloonFormationParams(X4_0, DEFAULT_POS_Y, BALLOON_VELX_POSITIVE, BalloonType::BALLOON, BalloonSize::SIZE_3, CREATION_TIME), BalloonFormationParams(X4_0, DEFAULT_POS_Y, Balloon::VELX_POSITIVE, Balloon::Type::BALLOON, Balloon::Size::EXTRALARGE, CREATION_TIME),
BalloonFormationParams(X4_100, DEFAULT_POS_Y, BALLOON_VELX_NEGATIVE, BalloonType::BALLOON, BalloonSize::SIZE_3, CREATION_TIME)}; BalloonFormationParams(X4_100, DEFAULT_POS_Y, Balloon::VELX_NEGATIVE, Balloon::Type::BALLOON, Balloon::Size::EXTRALARGE, CREATION_TIME)};
balloon_formation_.emplace_back(2, basic_formation); balloon_formation_.emplace_back(2, basic_formation);
} }

View File

@@ -6,24 +6,24 @@
#include <string> // Para string #include <string> // Para string
#include <vector> // Para vector #include <vector> // Para vector
#include "balloon.h" // Para BalloonSize, BalloonType #include "balloon.h" // Para Balloon::Size, Balloon::Type
// --- Constantes de configuración --- // --- Constantes de configuración ---
// --- Estructuras de datos --- // --- Estructuras de datos ---
struct BalloonFormationParams { struct BalloonFormationParams {
int x = 0; // Posición en el eje X donde crear el globo int x = 0; // Posición en el eje X donde crear el globo
int y = 0; // Posición en el eje Y donde crear el globo int y = 0; // Posición en el eje Y donde crear el globo
float vel_x = 0.0F; // Velocidad inicial en el eje X float vel_x = 0.0F; // Velocidad inicial en el eje X
BalloonType type = BalloonType::BALLOON; // Tipo de globo Balloon::Type type = Balloon::Type::BALLOON; // Tipo de globo
BalloonSize size = BalloonSize::SIZE_0; // Tamaño de globo Balloon::Size size = Balloon::Size::SMALL; // Tamaño de globo
int creation_counter = 0; // Temporizador para la creación del globo int creation_counter = 0; // Temporizador para la creación del globo
// Constructor por defecto // Constructor por defecto
BalloonFormationParams() = default; BalloonFormationParams() = default;
// Constructor con parámetros // Constructor con parámetros
BalloonFormationParams(int x_val, int y_val, float vel_x_val, BalloonType type_val, BalloonSize size_val, int creation_counter_val) BalloonFormationParams(int x_val, int y_val, float vel_x_val, Balloon::Type type_val, Balloon::Size size_val, int creation_counter_val)
: x(x_val), y(y_val), vel_x(vel_x_val), type(type_val), size(size_val), creation_counter(creation_counter_val) {} : x(x_val), y(y_val), vel_x(vel_x_val), type(type_val), size(size_val), creation_counter(creation_counter_val) {}
}; };
@@ -68,15 +68,27 @@ class BalloonFormations {
std::vector<BalloonFormationUnit> balloon_formation_; // Vector con todas las formaciones enemigas std::vector<BalloonFormationUnit> balloon_formation_; // Vector con todas las formaciones enemigas
std::vector<BalloonFormationPool> balloon_formation_pool_; // Conjuntos de formaciones enemigas std::vector<BalloonFormationPool> balloon_formation_pool_; // Conjuntos de formaciones enemigas
// --- Métodos internos de inicialización --- // --- Inicialización de formaciones ---
void initFormations(); // Inicializa la lista principal de formaciones de globos disponibles void initFormations(); // Inicializa la lista principal de formaciones de globos disponibles
void initFormationPools(); // Prepara las estructuras de agrupamiento o reutilización de formaciones (pools) void initFormationPools(); // Prepara las estructuras de agrupamiento o reutilización de formaciones (pools)
// --- Carga y análisis de datos ---
auto loadFormationsFromFile(const std::string& filename, const std::map<std::string, float>& variables) -> bool; // Carga las formaciones desde un archivo, evaluando variables dinámicas auto loadFormationsFromFile(const std::string& filename, const std::map<std::string, float>& variables) -> bool; // Carga las formaciones desde un archivo, evaluando variables dinámicas
auto parseBalloonLine(const std::string& line, const std::map<std::string, float>& variables) -> std::optional<BalloonFormationParams>; // Parsea una línea individual del archivo y genera parámetros de formación auto parseBalloonLine(const std::string& line, const std::map<std::string, float>& variables) -> std::optional<BalloonFormationParams>; // Parsea una línea individual del archivo y genera parámetros de formación
auto evaluateExpression(const std::string& expr, const std::map<std::string, float>& variables) -> float; // Evalúa expresiones matemáticas con variables definidas (complejas)
auto evaluateSimpleExpression(const std::string& expr, const std::map<std::string, float>& variables) -> float; // Evalúa expresiones más sencillas (sin paréntesis o operadores avanzados) // --- Evaluación de expresiones ---
static auto trim(const std::string& str) -> std::string; // Elimina espacios en blanco al inicio y fin de una cadena auto evaluateExpression(const std::string& expr, const std::map<std::string, float>& variables) -> float; // Evalúa expresiones matemáticas con variables definidas (complejas)
void createFloaterVariants(); // Genera variantes de globos flotantes según configuración o aleatoriedad auto evaluateSimpleExpression(const std::string& expr, const std::map<std::string, float>& variables) -> float; // Evalúa expresiones más sencillas (sin paréntesis o operadores avanzados)
void addTestFormation(); // Añade una formación de prueba para debug o validación en tiempo de desarrollo
void loadDefaultFormations(); // Carga las formaciones por defecto incluidas en el juego si no hay archivo externo // --- Utilidades ---
static auto trim(const std::string& str) -> std::string; // Elimina espacios en blanco al inicio y fin de una cadena
// --- Generación de variantes ---
void createFloaterVariants(); // Genera variantes de globos flotantes según configuración o aleatoriedad
void loadDefaultFormations(); // Carga las formaciones por defecto incluidas en el juego si no hay archivo externo
// --- Depuración (solo en modo DEBUG) ---
#ifdef _DEBUG
void addTestFormation(); // Añade una formación de prueba para debug o validación en tiempo de desarrollo
#endif
}; };

View File

@@ -214,7 +214,7 @@ void BalloonManager::createPowerBall() {
const std::array<float, VALUES> POS_X = {LEFT, LEFT, CENTER, CENTER, RIGHT, RIGHT}; const std::array<float, VALUES> POS_X = {LEFT, LEFT, CENTER, CENTER, RIGHT, RIGHT};
const std::array<float, VALUES> VEL_X = {Balloon::VELX_POSITIVE, Balloon::VELX_POSITIVE, Balloon::VELX_POSITIVE, Balloon::VELX_NEGATIVE, Balloon::VELX_NEGATIVE, Balloon::VELX_NEGATIVE}; const std::array<float, VALUES> VEL_X = {Balloon::VELX_POSITIVE, Balloon::VELX_POSITIVE, Balloon::VELX_POSITIVE, Balloon::VELX_NEGATIVE, Balloon::VELX_NEGATIVE, Balloon::VELX_NEGATIVE};
balloons_.emplace_back(std::make_unique<Balloon>(POS_X[LUCK], POS_Y, Balloon::Type::POWERBALL, Balloon::Size::SIZE_3, VEL_X[LUCK], balloon_speed_, CREATION_TIME, play_area_, balloon_textures_[4], balloon_animations_[4])); balloons_.emplace_back(std::make_unique<Balloon>(POS_X[LUCK], POS_Y, Balloon::Type::POWERBALL, Balloon::Size::EXTRALARGE, VEL_X[LUCK], balloon_speed_, CREATION_TIME, play_area_, balloon_textures_[4], balloon_animations_[4]));
balloons_.back()->setInvulnerable(true); balloons_.back()->setInvulnerable(true);
power_ball_enabled_ = true; power_ball_enabled_ = true;
@@ -242,7 +242,7 @@ auto BalloonManager::popBalloon(std::shared_ptr<Balloon> balloon) -> int {
balloon_deploy_counter_ = 20; balloon_deploy_counter_ = 20;
} else { } else {
score = balloon->getScore(); score = balloon->getScore();
if (balloon->getSize() != Balloon::Size::SIZE_0) { if (balloon->getSize() != Balloon::Size::SMALL) {
createChildBalloon(balloon, "LEFT"); createChildBalloon(balloon, "LEFT");
createChildBalloon(balloon, "RIGHT"); createChildBalloon(balloon, "RIGHT");
} }
@@ -261,16 +261,16 @@ auto BalloonManager::destroyBalloon(std::shared_ptr<Balloon> &balloon) -> int {
// Calcula la puntuación y el poder que generaria el globo en caso de romperlo a él y a sus hijos // Calcula la puntuación y el poder que generaria el globo en caso de romperlo a él y a sus hijos
switch (balloon->getSize()) { switch (balloon->getSize()) {
case Balloon::Size::SIZE_3: case Balloon::Size::EXTRALARGE:
score = Balloon::SCORE.at(3) + (2 * Balloon::SCORE.at(2)) + (4 * Balloon::SCORE.at(1)) + (8 * Balloon::SCORE.at(0)); score = Balloon::SCORE.at(3) + (2 * Balloon::SCORE.at(2)) + (4 * Balloon::SCORE.at(1)) + (8 * Balloon::SCORE.at(0));
break; break;
case Balloon::Size::SIZE_2: case Balloon::Size::LARGE:
score = Balloon::SCORE.at(2) + (2 * Balloon::SCORE.at(1)) + (4 * Balloon::SCORE.at(0)); score = Balloon::SCORE.at(2) + (2 * Balloon::SCORE.at(1)) + (4 * Balloon::SCORE.at(0));
break; break;
case Balloon::Size::SIZE_1: case Balloon::Size::MEDIUM:
score = Balloon::SCORE.at(1) + (2 * Balloon::SCORE.at(0)); score = Balloon::SCORE.at(1) + (2 * Balloon::SCORE.at(0));
break; break;
case Balloon::Size::SIZE_0: case Balloon::Size::SMALL:
score = Balloon::SCORE.at(0); score = Balloon::SCORE.at(0);
break; break;
default: default:

View File

@@ -206,7 +206,7 @@ void parseAndSetController(const std::string& var, const std::string& value) {
auto set(const std::string& var, const std::string& value) -> bool { auto set(const std::string& var, const std::string& value) -> bool {
// Clausula de protección: ignora líneas vacías o comentarios // Clausula de protección: ignora líneas vacías o comentarios
if (var.empty() || var.starts_with("#")) { if (var.empty() || var.starts_with("#")) {
return false; return true;
} }
// Un mapa estático asegura que se inicializa solo una vez // Un mapa estático asegura que se inicializa solo una vez

View File

@@ -11,7 +11,7 @@
#include "asset.h" // Para Asset #include "asset.h" // Para Asset
#include "audio.h" // Para Audio #include "audio.h" // Para Audio
#include "background.h" // Para Background #include "background.h" // Para Background
#include "balloon.h" // Para Balloon, BALLOON_SPEED #include "balloon.h" // Para Balloon, Balloon::SPEED
#include "balloon_manager.h" // Para BalloonManager #include "balloon_manager.h" // Para BalloonManager
#include "bullet.h" // Para Bullet, BulletType, BulletMoveStatus #include "bullet.h" // Para Bullet, BulletType, BulletMoveStatus
#include "color.h" // Para Color, FLASH_COLOR #include "color.h" // Para Color, FLASH_COLOR
@@ -1539,21 +1539,21 @@ void Game::initDifficultyVars() {
// Variables relacionadas con la dificultad // Variables relacionadas con la dificultad
switch (difficulty_) { switch (difficulty_) {
case Difficulty::Code::EASY: { case Difficulty::Code::EASY: {
balloon_manager_->setDefaultBalloonSpeed(BALLOON_SPEED[0]); balloon_manager_->setDefaultBalloonSpeed(Balloon::SPEED.at(0));
difficulty_score_multiplier_ = 0.5F; difficulty_score_multiplier_ = 0.5F;
scoreboard_->setColor(param.scoreboard.easy_color); scoreboard_->setColor(param.scoreboard.easy_color);
break; break;
} }
case Difficulty::Code::NORMAL: { case Difficulty::Code::NORMAL: {
balloon_manager_->setDefaultBalloonSpeed(BALLOON_SPEED[0]); balloon_manager_->setDefaultBalloonSpeed(Balloon::SPEED.at(0));
difficulty_score_multiplier_ = 1.0F; difficulty_score_multiplier_ = 1.0F;
scoreboard_->setColor(param.scoreboard.normal_color); scoreboard_->setColor(param.scoreboard.normal_color);
break; break;
} }
case Difficulty::Code::HARD: { case Difficulty::Code::HARD: {
balloon_manager_->setDefaultBalloonSpeed(BALLOON_SPEED[4]); balloon_manager_->setDefaultBalloonSpeed(Balloon::SPEED.at(4));
difficulty_score_multiplier_ = 1.5F; difficulty_score_multiplier_ = 1.5F;
scoreboard_->setColor(param.scoreboard.hard_color); scoreboard_->setColor(param.scoreboard.hard_color);
break; break;
@@ -1768,8 +1768,8 @@ void Game::checkAndUpdateBalloonSpeed() {
constexpr std::array<float, 4> THRESHOLDS = {0.2F, 0.4F, 0.6F, 0.8F}; constexpr std::array<float, 4> THRESHOLDS = {0.2F, 0.4F, 0.6F, 0.8F};
for (size_t i = 0; i < std::size(THRESHOLDS); ++i) { for (size_t i = 0; i < std::size(THRESHOLDS); ++i) {
if (balloon_manager_->getBalloonSpeed() == BALLOON_SPEED[i] && PERCENT > THRESHOLDS[i]) { if (balloon_manager_->getBalloonSpeed() == Balloon::SPEED.at(i) && PERCENT > THRESHOLDS[i]) {
balloon_manager_->setBalloonSpeed(BALLOON_SPEED[i + 1]); balloon_manager_->setBalloonSpeed(Balloon::SPEED.at(i + 1));
break; // Salir del bucle una vez actualizada la velocidad y aplicada break; // Salir del bucle una vez actualizada la velocidad y aplicada
} }
} }