Andrew_Manu

jueguito

Aug 5th, 2019
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.92 KB | None | 0 0
  1. /// Base del juego
  2.  
  3. global.naveActual = PRIMER_NAVE;
  4.  
  5. if(room != rm_jugando)
  6.     global.nivelActual = EN_MENU;
  7.  
  8. global.registroPalabras[0] = "Cerveza";
  9. global.registroPalabras[1] = "Queseyo";
  10. global.registroPalabras[2] = "Hola";
  11.  
  12. for (var  i=0; i<20; i++)
  13.    registroFotos[i] = i;
  14.    
  15. if keyboard_check_pressed(vk_escape)
  16.     game_end();
  17.  
  18. /// Mouse: detección y cambio de index de la Nave
  19.  
  20. // Guarda el número de index de la nave actual
  21. var numeroDeNave = obj_Nave.image_index;
  22.  
  23. // Al superponer el cursor en las sig. coordenadas
  24. if(mouse_x >= 448 and mouse_x <= 512 and mouse_y >= 416 and mouse_y <= 480){
  25.     image_index = 1;
  26.  
  27.     if(mouse_check_button_pressed(mb_left)){
  28.         // Cambia el index de la nave al contrario
  29.         if(numeroDeNave == 0)
  30.             numeroDeNave = 1;
  31.         else
  32.             numeroDeNave = 0;
  33.         obj_Nave.image_index = numeroDeNave;
  34.     }
  35. }else
  36.     image_index = 0;
Advertisement
Add Comment
Please, Sign In to add comment