Skip to content

Instantly share code, notes, and snippets.

@ZeroPivot
Created December 24, 2020 10:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZeroPivot/22b7c45fa29a6cf41d22fca252e20f52 to your computer and use it in GitHub Desktop.
Save ZeroPivot/22b7c45fa29a6cf41d22fca252e20f52 to your computer and use it in GitHub Desktop.
def sprite_fetch_arr(args, sprite_name)
sprite_coordinates = []
args.outputs.sprites.each_with_index do |sprite, index|
if (sprite.sprite_name == sprite_name)
sprite_coordinates = args.outputs.sprites[index].xywh_arr
args.outputs.labels << LabelUse.new(600, 600, "#{sprite_coordinates}", 2, 0, "fonts/AritySpeak.tif", 0, 0, 255, 255)
break
end
end
return sprite_coordinates
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment