Advertisement
otorp2

Sprite.new() with texture load

Nov 1st, 2015
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. extends Node2D
  2.  
  3. # member variables here, example:
  4. # var a=2
  5. # var b="textvar"
  6.  
  7. func _ready():
  8. var spr = Sprite.new()
  9. add_child(spr)
  10. spr.set_texture(preload("res://icon.png"))
  11.  
  12.  
  13. pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement