first version of EU AI Act game
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
extends Node3D
|
||||
|
||||
var do_rotate = false
|
||||
var rotation_speed = 0.0 # starting speed
|
||||
var acceleration = -180.0 # how fast the spin speeds up
|
||||
var j := 0
|
||||
|
||||
func _ready() -> void:
|
||||
$AnimationPlayer.play("move_to_circle")
|
||||
$audio_portal.play()
|
||||
|
||||
func _process(delta):
|
||||
if do_rotate:
|
||||
rotation_speed += acceleration * delta
|
||||
$TextTilt/Pivot.rotation_degrees.z += rotation_speed * delta
|
||||
|
||||
|
||||
func _on_animation_player_animation_finished(anim_name: StringName) -> void:
|
||||
if anim_name=="move_to_circle":
|
||||
await get_tree().create_timer(0.5).timeout
|
||||
$AnimationPlayer.play("move_shuttle")
|
||||
do_rotate = true
|
||||
await get_tree().create_timer(3.0).timeout
|
||||
do_rotate = false
|
||||
$AnimationPlayer.play("finish")
|
||||
if anim_name=="finish":
|
||||
Transition.change_scene("res://Resources/Terrains/chip/terrain_chip.tscn")
|
||||
|
||||
|
||||
func _on_animation_player_animation_started(anim_name: StringName) -> void:
|
||||
if anim_name=="finish":
|
||||
var tween = create_tween()
|
||||
tween.tween_property($WorldEnvironment.environment, "background_energy_multiplier", 0.1, 3.0)
|
||||
|
||||
|
||||
func _on_audio_portal_finished() -> void:
|
||||
$audio2.play()
|
||||
|
||||
|
||||
func _on_audio_2_finished() -> void:
|
||||
if j < 2 :
|
||||
j += 1
|
||||
$audio2.play()
|
||||
else:
|
||||
$audio3.play()
|
||||
|
||||
|
||||
func _on_audio_3_finished() -> void:
|
||||
$audio4.play()
|
||||
Reference in New Issue
Block a user