@@ -28,20 +28,20 @@ Colisionable::Colisionable(float x, float y, float angulo, int tipoDeElemento){
28
28
this ->crearDisparoEnemigo (x, y, angulo);
29
29
break ;
30
30
case TIPO_POWERUP_BONIFICACION:
31
- this ->crearPowerUp (x,y,0 );
32
- break ;
33
- case TIPO_POWERUP_DESTRUIR_ENEMIGOS:
34
- this ->crearPowerUp (x,y,0 );
35
- break ;
36
- case TIPO_POWERUP_DOS_AMETRALLADORAS:
37
- this ->crearPowerUp (x,y,0 );
38
- break ;
39
- case TIPO_POWERUP_AVIONES_SECUNDARIOS:
40
- this ->crearPowerUp (x,y,0 );
41
- break ;
42
- case TIPO_POWERUP_BONIFICACION_1500:
43
- this ->crearPowerUp (x,y,0 );
44
- break ;
31
+ this ->crearPowerUp (x,y,0 );
32
+ break ;
33
+ case TIPO_POWERUP_DESTRUIR_ENEMIGOS:
34
+ this ->crearPowerUp (x,y,0 );
35
+ break ;
36
+ case TIPO_POWERUP_DOS_AMETRALLADORAS:
37
+ this ->crearPowerUp (x,y,0 );
38
+ break ;
39
+ case TIPO_POWERUP_AVIONES_SECUNDARIOS:
40
+ this ->crearPowerUp (x,y,0 );
41
+ break ;
42
+ case TIPO_POWERUP_BONIFICACION_1500:
43
+ this ->crearPowerUp (x,y,0 );
44
+ break ;
45
45
}
46
46
}
47
47
@@ -151,11 +151,11 @@ void Colisionable::crearPowerUp(float posX, float posY, float angulo){
151
151
this ->superficiePrincipal ->rotar (angulo, xCentro, yCentro, TIPO_POWERUP);
152
152
}
153
153
154
-
155
154
void Colisionable::mover (float posX, float posY, float angulo, int tipoElemento){
156
155
this ->superficiePrincipal ->mover (posX, posY);
157
156
float xCentral = posX + (this ->superficiePrincipal ->getAncho () / 2 );
158
157
float yCentral = posY + (this ->superficiePrincipal ->getAlto () / 2 );
158
+ // this->superficiePrincipal->rotar(angulo, xCentral, yCentral);
159
159
for (unsigned int i = 0 ; i < this ->superficiesSecundarias .size (); i++){
160
160
this ->superficiesSecundarias [i]->mover (posX, posY);
161
161
this ->superficiesSecundarias [i]->rotar (angulo, xCentral, yCentral, tipoElemento);
@@ -277,6 +277,7 @@ float Colisionable::getExtremoSuperior(){
277
277
extremoSuperior = superficiePrincipal->getIzqArriba ()->getPosY ();
278
278
}
279
279
280
+
280
281
if (extremoSuperior < superficiePrincipal->getDerArriba ()->getPosY ()){
281
282
extremoSuperior = superficiePrincipal->getDerArriba ()->getPosY ();
282
283
}
@@ -316,4 +317,4 @@ void Colisionable::proyectarColisionable(float timeStep) {
316
317
posY += posY * timeStep;
317
318
this ->superficiePrincipal ->getDerArriba ()->setPosY (posY);
318
319
this ->superficiePrincipal ->getIzqArriba ()->setPosY (posY);
319
- }
320
+ }
0 commit comments