First_Person_Slapper/Steps.gd

17 lines
338 B
GDScript3
Raw Normal View History

2022-10-11 16:32:48 -04:00
extends Control
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
onready var Steps = [ $Step1, $Step2, $Step3, $Step4 ]
var rng = RandomNumberGenerator.new()
# Called when the node enters the scene tree for the first time.
func _ready():
rng.randomize()
func playStep():
Steps[rng.randi_range(0,3)].play();