ludum-dare-21/scripts/object_get_depth/object_get_depth.gml

15 lines
393 B
Plaintext
Raw Normal View History

2021-06-16 23:23:00 -07:00
/// @description Returns the depth of the specified object.
/// @param {Number} obj The index of the object to check
/// @return {Number} depth of the object
function object_get_depth(argument0) {
var objID = argument0;
var ret = 0;
if (objID >= 0) && (objID < array_length_1d(global.__objectID2Depth)) {
ret = global.__objectID2Depth[objID];
} // end if
return ret;
}