-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
107 changed files
with
1,425 additions
and
121 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,24 @@ | ||
var cam_size = 600; | ||
|
||
var cam_x = camera_get_view_x(view_camera[0]); | ||
var cam_y = camera_get_view_y(view_camera[0]); | ||
var cam_w = camera_get_view_width(view_camera[0]); | ||
var cam_h = camera_get_view_height(view_camera[0]); | ||
|
||
var cam_center_x = cam_x + cam_w / 2; | ||
var cam_center_y = cam_y + cam_h / 2; | ||
|
||
var obj_x = x; | ||
var obj_y = y; | ||
|
||
var in_camera_view = (obj_x >= cam_x && obj_x <= cam_x + cam_size) && (obj_y >= cam_y && obj_y <= cam_y + cam_size); | ||
var in_camera_view = (obj_x >= cam_x && obj_x <= cam_x + cam_w) && (obj_y >= cam_y && obj_y <= cam_y + cam_h); | ||
|
||
if (in_camera_view && !audio_is_playing(walk_sound_instance)) { | ||
walk_sound_instance = audio_play_sound(snd_walk, 10, false, 1, 0, random_range(0.65,0.8)); | ||
var falloff_ref = 100; | ||
var falloff_max = 500; | ||
var falloff_factor = 1; | ||
var adjusted_obj_x = cam_center_x - obj_x; | ||
|
||
walk_sound_instance = audio_play_sound_at(snd_walk, adjusted_obj_x, obj_y - cam_center_y, 0, falloff_ref, falloff_max, falloff_factor, 0, 10, 1, 0, random_range(0.65,0.8)); | ||
} else if (!in_camera_view || audio_is_playing(walk_sound_instance)) { | ||
audio_stop_sound(walk_sound_instance); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,24 @@ | ||
var cam_size = 600; | ||
|
||
var cam_x = camera_get_view_x(view_camera[0]); | ||
var cam_y = camera_get_view_y(view_camera[0]); | ||
var cam_w = camera_get_view_width(view_camera[0]); | ||
var cam_h = camera_get_view_height(view_camera[0]); | ||
|
||
var cam_center_x = cam_x + cam_w / 2; | ||
var cam_center_y = cam_y + cam_h / 2; | ||
|
||
var obj_x = x; | ||
var obj_y = y; | ||
|
||
var in_camera_view = (obj_x >= cam_x && obj_x <= cam_x + cam_size) && (obj_y >= cam_y && obj_y <= cam_y + cam_size); | ||
var in_camera_view = (obj_x >= cam_x && obj_x <= cam_x + cam_w) && (obj_y >= cam_y && obj_y <= cam_y + cam_h); | ||
|
||
if (in_camera_view && !audio_is_playing(walk_sound_instance)) { | ||
walk_sound_instance = audio_play_sound(snd_walk, 10, false, 1, 0, random_range(0.95,1.15)); | ||
var falloff_ref = 100; | ||
var falloff_max = 500; | ||
var falloff_factor = 1; | ||
var adjusted_obj_x = cam_center_x - obj_x; | ||
|
||
walk_sound_instance = audio_play_sound_at(snd_walk, adjusted_obj_x, obj_y - cam_center_y, 0, falloff_ref, falloff_max, falloff_factor, 0, 10, 1, 0, random_range(0.95,1.15)); | ||
} else if (!in_camera_view || audio_is_playing(walk_sound_instance)) { | ||
audio_stop_sound(walk_sound_instance); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,24 @@ | ||
var cam_size = 600; | ||
|
||
var cam_x = camera_get_view_x(view_camera[0]); | ||
var cam_y = camera_get_view_y(view_camera[0]); | ||
var cam_w = camera_get_view_width(view_camera[0]); | ||
var cam_h = camera_get_view_height(view_camera[0]); | ||
|
||
var cam_center_x = cam_x + cam_w / 2; | ||
var cam_center_y = cam_y + cam_h / 2; | ||
|
||
var obj_x = x; | ||
var obj_y = y; | ||
|
||
var in_camera_view = (obj_x >= cam_x && obj_x <= cam_x + cam_size) && (obj_y >= cam_y && obj_y <= cam_y + cam_size); | ||
var in_camera_view = (obj_x >= cam_x && obj_x <= cam_x + cam_w) && (obj_y >= cam_y && obj_y <= cam_y + cam_h); | ||
|
||
if (in_camera_view && !audio_is_playing(walk_sound_instance)) { | ||
walk_sound_instance = audio_play_sound(snd_walk, 10, false, 1, 0, random_range(0.55,0.65)); | ||
var falloff_ref = 100; | ||
var falloff_max = 500; | ||
var falloff_factor = 1; | ||
var adjusted_obj_x = cam_center_x - obj_x; | ||
|
||
walk_sound_instance = audio_play_sound_at(snd_walk, adjusted_obj_x, obj_y - cam_center_y, 0, falloff_ref, falloff_max, falloff_factor, 0, 10, 1, 0, random_range(0.55,0.65)); | ||
} else if (!in_camera_view || audio_is_playing(walk_sound_instance)) { | ||
audio_stop_sound(walk_sound_instance); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.