-
-
Save tinkerer-red/2ecc130117d19a4203377a6809922c47 to your computer and use it in GitHub Desktop.
is_asset
This file contains hidden or 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
| // idk | |
| function is_sprite(_value) { | |
| if !is_handle(_value) return false; | |
| return sprite_exists(_value); | |
| } | |
| function is_instance(_value) { | |
| if !is_handle(_value) return false; | |
| return !object_exists(_value) && instance_exists(_value); | |
| } | |
| function is_object(_value) { | |
| if !is_handle(_value) return false; | |
| return object_exists(_value); | |
| } | |
| function is_script(_value) { | |
| if !is_handle(_value) return false; | |
| return script_exists(_value); | |
| } | |
| function is_room(_value) { | |
| if !is_handle(_value) return false; | |
| return room_exists(_value); | |
| } | |
| function is_font(_value) { | |
| if !is_handle(_value) return false; | |
| return font_exists(_value); | |
| } | |
| function is_path(_value) { | |
| if !is_handle(_value) return false; | |
| return path_exists(_value); | |
| } | |
| function is_sequence(_value) { | |
| if !is_handle(_value) return false; | |
| return sequence_exists(_value); | |
| } | |
| function is_animcurve(_value) { | |
| if !is_handle(_value) return false; | |
| return animcurve_exists(_value); | |
| } | |
| function is_sound(_value) { | |
| if !is_handle(_value) return false; | |
| return audio_exists(_value); | |
| } | |
| function is_surface(_value) { | |
| if !is_handle(_value) return false; | |
| return surface_exists(_value); | |
| } | |
| function is_ds_map(_value) { | |
| if !is_handle(_value) return false; | |
| return ds_exists(_value, ds_type_map); | |
| } | |
| function is_ds_list(_value) { | |
| if !is_handle(_value) return false; | |
| return ds_exists(_value, ds_type_list); | |
| } | |
| function is_ds_stack(_value) { | |
| if !is_handle(_value) return false; | |
| return ds_exists(_value, ds_type_stack); | |
| } | |
| function is_ds_queue(_value) { | |
| if !is_handle(_value) return false; | |
| return ds_exists(_value, ds_type_queue); | |
| } | |
| function is_ds_priority(_value) { | |
| if !is_handle(_value) return false; | |
| return ds_exists(_value, ds_type_priority); | |
| } | |
| function is_ds_grid(_value) { | |
| if !is_handle(_value) return false; | |
| return ds_exists(_value, ds_type_grid); | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
forked from Tab since he never made his public