Advertisement
FunMove

appleman

Aug 11th, 2015
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. // Тип 0 - пустота
  2. // Тип 1 - блок
  3. // Тип 2 - еда
  4. // Тип 3 - игрок
  5. // Тип 4 - игрок-камень
  6. // Тип 5 - игрок-камень2
  7.  
  8. map_line0 = '1111111111';
  9. map_line1 = '1300101021'; //i = 1 j = 3
  10. map_line2 = '1110100001';
  11. map_line3 = '1010141001';
  12. map_line4 = '1000121111';
  13. map_line5 = '1011000121';
  14. map_line6 = '1200200101';
  15. map_line7 = '1110100101';
  16. map_line8 = '1502122001';
  17. map_line9 = '1111111111';
  18. map_line = map_line0 + map_line1 + map_line2 + map_line3 + map_line4 + map_line5 + map_line6 + map_line7 + map_line8 + map_line9;
  19.  
  20. for(i=0; i<10; i+=1){
  21. for(j=1; j<11; j+=1){
  22. // switch(string_char_at('map_line'+string(i),j)){
  23. switch(string_char_at(map_line,i*10 + j)){
  24. case '0': break;
  25. case '1': instance_create(i*35+20, j*30+20, obj_block); break;
  26. case '2': instance_create(i*35+20, j*30+20, obj_apple); break;
  27. case '3': instance_create(i*35+20, j*30+20, obj_hero_stone); break;
  28. case '4': instance_create(i*35+20, j*30+20, obj_hero_stone2); break;
  29. case '5': instance_create(i*35+20, j*30+20, obj_hero_stone3); break;
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement