Advertisement
Guest User

GAMEBOX 1: SOURCE CODE shape.gd

a guest
Sep 16th, 2019
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. extends Node2D
  2.  
  3. var textures = [
  4.     "res://Graphics/o.png",
  5.     "res://Graphics/tri.png",
  6.     "res://Graphics/x.png"
  7. ]
  8.  
  9. func _ready():
  10.     randomize()
  11.     set_random_texture()
  12.    
  13. func set_random_texture() -> void:
  14.     var selection = textures[randi()%textures.size()]
  15.     $Sprite.texture = load(selection)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement