SHARE
TWEET

GAMEBOX 1: SOURCE CODE shape.gd

a guest Sep 16th, 2019 108 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top