1 | function backgrounds_parallax() //gml_Script_backgrounds_parallax |
2 | { |
3 | var _v = argument[0] |
4 | for (var _i = 1; _i < argument_count; _i++) |
5 | { |
6 | var _b = argument[_i] |
7 | __background_set((3 << 0), _b, ((__view_get((0 << 0), _v)) / (room_width - (__view_get((2 << 0), _v))) * (room_width - (__background_get((5 << 0), _b))))) |
8 | __background_set((4 << 0), _b, ((__view_get((1 << 0), _v)) / (room_height - (__view_get((3 << 0), _v))) * (room_height - (__background_get((6 << 0), _b))))) |
9 | } |
10 | } |