Skip to content

Instantly share code, notes, and snippets.

@zackp30
Created November 10, 2015 14:05
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 zackp30/d33e95e139415913e6c1 to your computer and use it in GitHub Desktop.
Save zackp30/d33e95e139415913e6c1 to your computer and use it in GitHub Desktop.
func _on_Timer_timeout():
set_pos(Vector2(randf() * get_node("..").get_size().width - get_texture().get_width() * get_scale(), \
randf() * get_node("..").get("rect/size").height - get_texture().get_height() * get_scale()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment