LMC_dd

answer to a question https://vk.cc/9KldQI

Aug 29th, 2019
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. # answer to a question - https://vk.com/godot_engine?w=wall-70467171_18244%2Fall
  2. # Lang: GDScript
  3.  
  4. func add_sprite_with_rnd_frame():
  5. var obj = Sprite.new()
  6. obj.frame = randi() % (obj.vframes * obj.hframes)
  7. add_child(obj)
  8.  
  9.  
  10. func _ready():
  11. randomize()
  12.  
  13. add_sprite_with_rnd_frame()
Add Comment
Please, Sign In to add comment