18 lines
523 B
GDScript
18 lines
523 B
GDScript
extends Node3D
|
|
|
|
var prev_fractal
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready():
|
|
# Makes sure everything is in sync
|
|
$AnimationPlayer.play("Plane_005_armatureAction")
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(_delta):
|
|
|
|
if prev_fractal != Globals.fractal && !$AnimationPlayer.is_playing():
|
|
$AnimationPlayer.play("Plane_005_armatureAction")
|
|
if prev_fractal == Globals.fractal:
|
|
$AnimationPlayer.pause()
|
|
prev_fractal = Globals.fractal
|