Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Тип 0 - пустота
- // Тип 1 - блок
- // Тип 2 - еда
- // Тип 3 - игрок
- // Тип 4 - игрок-камень
- // Тип 5 - игрок-камень2
- map_line0 = '1111111111';
- map_line1 = '1300101021'; //i = 1 j = 3
- map_line2 = '1110100001';
- map_line3 = '1010141001';
- map_line4 = '1000121111';
- map_line5 = '1011000121';
- map_line6 = '1200200101';
- map_line7 = '1110100101';
- map_line8 = '1502122001';
- map_line9 = '1111111111';
- map_line = map_line0 + map_line1 + map_line2 + map_line3 + map_line4 + map_line5 + map_line6 + map_line7 + map_line8 + map_line9;
- for(i=0; i<10; i+=1){
- for(j=1; j<11; j+=1){
- // switch(string_char_at('map_line'+string(i),j)){
- switch(string_char_at(map_line,i*10 + j)){
- case '0': break;
- case '1': instance_create(i*35+20, j*30+20, obj_block); break;
- case '2': instance_create(i*35+20, j*30+20, obj_apple); break;
- case '3': instance_create(i*35+20, j*30+20, obj_hero_stone); break;
- case '4': instance_create(i*35+20, j*30+20, obj_hero_stone2); break;
- case '5': instance_create(i*35+20, j*30+20, obj_hero_stone3); break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement