1 |
var scroll_speed_current = ceil(scroll_speed) |
2 |
var num = tile_get_count() |
3 |
for (var i = 0; i < num; i++) |
4 |
{ |
5 |
var tile = tile_get_id(i) |
6 |
var tile_y = tile_get_y(tile) |
7 |
var tile_x = tile_get_x(tile) |
8 |
var tile_width = tile_get_width(tile) |
9 |
switch tile_get_depth(tile) |
10 |
{ |
11 |
case 1000000: |
12 |
var tile_shift = scroll_speed |
13 |
break |
14 |
} |
15 |
|
16 |
tile_set_position(tile, (tile_x + tile_shift), tile_y) |
17 |
tile_x = tile_get_x(tile) |
18 |
if (scroll_speed < 0) |
19 |
{ |
20 |
if (tile_x <= -20) |
21 |
tile_set_position(tile, room_width, tile_y) |
22 |
} |
23 |
else if (tile_x >= room_width) |
24 |
tile_set_position(tile, -20, tile_y) |
25 |
} |
26 |
if ((scroll_speed < 0 && wall_x > (-sprite_get_width(spr_gemwall))) || (scroll_speed > 0 && wall_x < sprite_get_width(spr_gemwall))) |
27 |
wall_x += (scroll_speed * 0.5) |
28 |
else |
29 |
wall_x = 0 |