Advertisement
otorp2

timer with sprite creation

Nov 2nd, 2015
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. # var b="textvar"
  2.  
  3.  
  4. func _ready():
  5. get_node("Timer").connect("timeout",get_parent().get_node("rootnode"),"printme")
  6. get_node("Timer").set_wait_time(1)
  7. get_node("Timer").start()
  8.  
  9. pass
  10.  
  11.  
  12. func printme():
  13. var sprite = Sprite.new()
  14. add_child(sprite)
  15. sprite.set_texture(preload("res://icon.png"))
  16. print("hi")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement