fix: tutorial spawn off-screen & anim, audio saving
This commit is contained in:
parent
15c98361c0
commit
c614d27d80
@ -17,7 +17,7 @@ force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=true
|
||||
edit/loop_mode=0
|
||||
edit/loop_mode=2
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
edit/loop_end=1505503
|
||||
compress/mode=0
|
||||
|
||||
@ -4385,7 +4385,7 @@ texture = SubResource( 62 )
|
||||
offset = Vector2( 1, 0 )
|
||||
hframes = 6
|
||||
vframes = 6
|
||||
frame = 7
|
||||
frame = 8
|
||||
__meta__ = {
|
||||
"_editor_description_": "YXNlcHJpdGVfd2l6YXJkX2NvbmZpZwpwbGF5ZXJ8PUJsb2JieVNwcml0ZS9CbG9iYnltYXRpb25QbGF5ZXIKc291cmNlfD1yZXM6Ly9hc3NldHMvYmxvYmJ5L2Jsb2JieS1zcHJpdGVzaGVldHQuYXNlcHJpdGUKbGF5ZXJ8PUJsb2JieQpvcF9leHB8PUZhbHNlCm9fZm9sZGVyfD0Kb19uYW1lfD0Kb25seV92aXNpYmxlfD1GYWxzZQpvX2V4X3B8PQo="
|
||||
}
|
||||
@ -4572,5 +4572,5 @@ one_shot = true
|
||||
[connection signal="got_grounded" from="BlobbyStateMachine" to="." method="_on_Blobby_got_grounded"]
|
||||
[connection signal="timeout" from="BlobbyStateMachine/JumpBufferTimer" to="BlobbyStateMachine" method="_on_JumpBufferTimer_timeout"]
|
||||
[connection signal="timeout" from="InvincibilityTimer" to="." method="_on_InvincibilityTimer_timeout"]
|
||||
[connection signal="timeout" from="PitfallTimer" to="." method="die_for_real"]
|
||||
[connection signal="timeout" from="PitfallTimer" to="." method="_on_PitfallTimer_timeout"]
|
||||
[connection signal="timeout" from="PitfallTimer" to="." method="die_for_real"]
|
||||
|
||||
@ -180,7 +180,7 @@ initial_wait_time = 4.0
|
||||
[node name="Button" parent="Tutorials/LeftTut" index="0"]
|
||||
material = SubResource( 12 )
|
||||
|
||||
[node name="AnimationPlayer" parent="Tutorials/LeftTut" index="5"]
|
||||
[node name="AnimationPlayer" parent="Tutorials/LeftTut" index="4"]
|
||||
anims/RESET = SubResource( 7 )
|
||||
anims/cease_4_exist = SubResource( 8 )
|
||||
|
||||
@ -196,7 +196,7 @@ initial_wait_time = 2.0
|
||||
[node name="Button" parent="Tutorials/RightTut" index="0"]
|
||||
material = SubResource( 13 )
|
||||
|
||||
[node name="AnimationPlayer" parent="Tutorials/RightTut" index="5"]
|
||||
[node name="AnimationPlayer" parent="Tutorials/RightTut" index="4"]
|
||||
anims/RESET = SubResource( 9 )
|
||||
anims/cease_4_exist = SubResource( 10 )
|
||||
|
||||
@ -213,7 +213,7 @@ position = Vector2( -70, 1 )
|
||||
scale = Vector2( 0.878906, 0.936025 )
|
||||
|
||||
[node name="BlobbySprite" parent="Blobby" index="5"]
|
||||
frame = 8
|
||||
frame = 6
|
||||
|
||||
[node name="BlobbymationTree" parent="Blobby/BlobbySprite" index="0"]
|
||||
parameters/playback = SubResource( 14 )
|
||||
|
||||
@ -49,9 +49,6 @@ unique_name_in_owner = true
|
||||
position = Vector2( 251, -24 )
|
||||
scale = Vector2( 0.878906, 0.936025 )
|
||||
|
||||
[node name="BlobbySprite" parent="Blobby" index="5"]
|
||||
frame = 6
|
||||
|
||||
[node name="BlobbymationTree" parent="Blobby/BlobbySprite" index="0"]
|
||||
parameters/playback = SubResource( 1 )
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=26 format=2]
|
||||
[gd_scene load_steps=22 format=2]
|
||||
|
||||
[ext_resource path="res://src/BenefitialObjects/Coin.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://src/Actors/BlobbyCam.tscn" type="PackedScene" id=2]
|
||||
@ -9,7 +9,6 @@
|
||||
[ext_resource path="res://src/Levels/Templates/LevelTemplate.gd" type="Script" id=7]
|
||||
[ext_resource path="res://src/Contraptions/Portal/Portal.tscn" type="PackedScene" id=8]
|
||||
[ext_resource path="res://assets/sounds/AMBIENCE_SciFi_Large_Space_Hangar_Deep_Smooth_loop_stereo.wav" type="AudioStream" id=9]
|
||||
[ext_resource path="res://src/Platforms/legacy/FlyingPlatformClean.tscn" type="PackedScene" id=10]
|
||||
[ext_resource path="res://src/ObstacleObjects/Mine.tscn" type="PackedScene" id=11]
|
||||
[ext_resource path="res://src/Platforms/FlyingLaserCutter.tscn" type="PackedScene" id=12]
|
||||
[ext_resource path="res://src/Platforms/legacy/DropThroughPlatform.tscn" type="PackedScene" id=13]
|
||||
@ -20,77 +19,10 @@
|
||||
[ext_resource path="res://src/ObstacleObjects/Spikes.tscn" type="PackedScene" id=18]
|
||||
[ext_resource path="res://src/BenefitialObjects/SavePoint.tscn" type="PackedScene" id=19]
|
||||
[ext_resource path="res://src/Environment/Legacy/Greenhouse.tscn" type="PackedScene" id=20]
|
||||
[ext_resource path="res://src/Platforms/FlyingPlatformSmol.tscn" type="PackedScene" id=21]
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachinePlayback" id=9]
|
||||
|
||||
[sub_resource type="Animation" id=5]
|
||||
resource_name = "Horizontal"
|
||||
length = 6.0
|
||||
loop = true
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("KinematicBody2D:position")
|
||||
tracks/0/interp = 2
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 3 ),
|
||||
"transitions": PoolRealArray( 1.33, 1.33 ),
|
||||
"update": 0,
|
||||
"values": [ Vector2( 0, 0 ), Vector2( -84, 0 ) ]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id=6]
|
||||
resource_name = "Horizontal"
|
||||
length = 6.0
|
||||
loop = true
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("KinematicBody2D:position")
|
||||
tracks/0/interp = 2
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 3 ),
|
||||
"transitions": PoolRealArray( 1.33, 1.33 ),
|
||||
"update": 0,
|
||||
"values": [ Vector2( 0, 0 ), Vector2( 0, 48 ) ]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id=8]
|
||||
resource_name = "Horizontal"
|
||||
length = 6.0
|
||||
loop = true
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("KinematicBody2D:position")
|
||||
tracks/0/interp = 2
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 3 ),
|
||||
"transitions": PoolRealArray( 1.33, 1.33 ),
|
||||
"update": 0,
|
||||
"values": [ Vector2( 0, 0 ), Vector2( 0, -48 ) ]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id=7]
|
||||
resource_name = "Horizontal"
|
||||
length = 6.0
|
||||
loop = true
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath("KinematicBody2D:position")
|
||||
tracks/0/interp = 2
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 3 ),
|
||||
"transitions": PoolRealArray( 1.33, 1.33 ),
|
||||
"update": 0,
|
||||
"values": [ Vector2( 0, 0 ), Vector2( -48, -24 ) ]
|
||||
}
|
||||
|
||||
[node name="Actual Level 3" type="Node2D"]
|
||||
script = ExtResource( 7 )
|
||||
__meta__ = {
|
||||
@ -114,17 +46,14 @@ unique_name_in_owner = true
|
||||
drag_margin_top = 0.08
|
||||
drag_margin_bottom = 0.08
|
||||
|
||||
[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"]
|
||||
frame = 8
|
||||
|
||||
[node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"]
|
||||
frame = 1
|
||||
|
||||
[node name="Blobby" parent="." instance=ExtResource( 5 )]
|
||||
unique_name_in_owner = true
|
||||
position = Vector2( -168, 95 )
|
||||
scale = Vector2( 0.878906, 0.936025 )
|
||||
|
||||
[node name="BlobbySprite" parent="Blobby" index="5"]
|
||||
frame = 6
|
||||
|
||||
[node name="BlobbymationTree" parent="Blobby/BlobbySprite" index="0"]
|
||||
parameters/playback = SubResource( 9 )
|
||||
|
||||
@ -277,32 +206,30 @@ position = Vector2( 756, 660 )
|
||||
[node name="Spikes17" parent="." instance=ExtResource( 18 )]
|
||||
position = Vector2( 780, 660 )
|
||||
|
||||
[node name="FlyingPlatformClean" parent="." instance=ExtResource( 10 )]
|
||||
position = Vector2( 456, 600 )
|
||||
[node name="FlyingPlatformSmol" parent="." instance=ExtResource( 21 )]
|
||||
position = Vector2( 456, 594 )
|
||||
x_target = 84
|
||||
speed = 24
|
||||
|
||||
[node name="FlyingPlatformClean2" parent="." instance=ExtResource( 10 )]
|
||||
position = Vector2( 720, 600 )
|
||||
[node name="FlyingPlatformSmol2" parent="." instance=ExtResource( 21 )]
|
||||
position = Vector2( 720, 594 )
|
||||
x_target = -84
|
||||
speed = 24
|
||||
|
||||
[node name="anim" parent="FlyingPlatformClean2" index="1"]
|
||||
anims/Horizontal = SubResource( 5 )
|
||||
[node name="FlyingPlatformSmol4" parent="." instance=ExtResource( 21 )]
|
||||
position = Vector2( 1080, 330 )
|
||||
y_target = 48
|
||||
speed = 24
|
||||
|
||||
[node name="FlyingPlatformClean3" parent="." instance=ExtResource( 10 )]
|
||||
position = Vector2( 1080, 336 )
|
||||
[node name="FlyingPlatformSmol5" parent="." instance=ExtResource( 21 )]
|
||||
position = Vector2( 984, 282 )
|
||||
y_target = -48
|
||||
speed = 24
|
||||
|
||||
[node name="anim" parent="FlyingPlatformClean3" index="1"]
|
||||
anims/Horizontal = SubResource( 6 )
|
||||
|
||||
[node name="FlyingPlatformClean5" parent="." instance=ExtResource( 10 )]
|
||||
position = Vector2( 984, 288 )
|
||||
|
||||
[node name="anim" parent="FlyingPlatformClean5" index="1"]
|
||||
anims/Horizontal = SubResource( 8 )
|
||||
|
||||
[node name="FlyingPlatformClean4" parent="." instance=ExtResource( 10 )]
|
||||
position = Vector2( 1185, 456 )
|
||||
|
||||
[node name="anim" parent="FlyingPlatformClean4" index="1"]
|
||||
anims/Horizontal = SubResource( 7 )
|
||||
[node name="FlyingPlatformSmol3" parent="." instance=ExtResource( 21 )]
|
||||
position = Vector2( 1176, 432 )
|
||||
y_target = -48
|
||||
speed = 24
|
||||
|
||||
[node name="FlyingLaserCutter" parent="." instance=ExtResource( 12 )]
|
||||
position = Vector2( 924, 132 )
|
||||
@ -344,8 +271,3 @@ bus = "Music"
|
||||
[editable path="BlobbyCam"]
|
||||
[editable path="Blobby"]
|
||||
[editable path="TileMap"]
|
||||
[editable path="FlyingPlatformClean"]
|
||||
[editable path="FlyingPlatformClean2"]
|
||||
[editable path="FlyingPlatformClean3"]
|
||||
[editable path="FlyingPlatformClean5"]
|
||||
[editable path="FlyingPlatformClean4"]
|
||||
|
||||
@ -16,20 +16,20 @@ var time
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
var start = Vector2(0,0)
|
||||
var end = Vector2(x_target, y_target)
|
||||
tween_values.append(start)
|
||||
tween_values.append(end)
|
||||
time = start.distance_to(end)/speed
|
||||
_start_tween()
|
||||
var start = Vector2(0,0)
|
||||
var end = Vector2(x_target, y_target)
|
||||
tween_values.append(start)
|
||||
tween_values.append(end)
|
||||
time = start.distance_to(end)/speed
|
||||
_start_tween()
|
||||
|
||||
func _start_tween():
|
||||
$FlyTween.interpolate_property($PlatformBody, "position",
|
||||
tween_values[0], tween_values[1], time,
|
||||
Tween.TRANS_QUAD, Tween.EASE_IN_OUT)
|
||||
$FlyTween.start()
|
||||
$FlyTween.interpolate_property($PlatformBody, "position",
|
||||
tween_values[0], tween_values[1], time,
|
||||
Tween.TRANS_QUAD, Tween.EASE_IN_OUT)
|
||||
$FlyTween.start()
|
||||
|
||||
|
||||
func _on_FlyTween_tween_completed(object: Object, key: NodePath) -> void:
|
||||
tween_values.invert()
|
||||
_start_tween()
|
||||
tween_values.invert()
|
||||
_start_tween()
|
||||
|
||||
@ -4,9 +4,9 @@ export(String, FILE) var next_screen_path: = ""
|
||||
onready var selected_screen_base_path: String = "res://src/UserInterface/Screens"
|
||||
|
||||
func _on_button_up() -> void:
|
||||
get_tree().change_scene(next_screen_path)
|
||||
get_tree().get_current_scene().queue_free()
|
||||
get_tree().paused = false
|
||||
get_tree().change_scene(next_screen_path)
|
||||
get_tree().get_current_scene().queue_free()
|
||||
get_tree().paused = false
|
||||
|
||||
func _get_configuration_warning() -> String:
|
||||
return "next_scene_path must be set for the button to work" if next_screen_path == "" else ""
|
||||
return "next_scene_path must be set for the button to work" if next_screen_path == "" else ""
|
||||
|
||||
@ -4,14 +4,14 @@ export(String, FILE) var next_scene_path: String = ""
|
||||
onready var selected_level_base_path: String = "res://src/Levels/"
|
||||
|
||||
func _on_button_up() -> void:
|
||||
GlobalAudio.stop_scene_independent("res://assets/music/Shopping For The Future (LOOP).wav")
|
||||
GlobalAudio.play_scene_independent("res://assets/sounds/MAGIC_SPELL_Morphing_Synth_Harp_Scales_Deep_stereo.wav", "Effects", -8)
|
||||
get_tree().change_scene(next_scene_path)
|
||||
get_tree().get_current_scene().queue_free()
|
||||
get_tree().paused = false
|
||||
GlobalAudio.stop_scene_independent("res://assets/music/Shopping For The Future (LOOP).wav")
|
||||
GlobalAudio.play_scene_independent("res://assets/sounds/MAGIC_SPELL_Morphing_Synth_Harp_Scales_Deep_stereo.wav", "Effects", -8)
|
||||
get_tree().change_scene(next_scene_path)
|
||||
get_tree().get_current_scene().queue_free()
|
||||
get_tree().paused = false
|
||||
|
||||
func _get_configuration_warning() -> String:
|
||||
return "next_scene_path must be set for the button to work" if next_scene_path == "" else ""
|
||||
return "next_scene_path must be set for the button to work" if next_scene_path == "" else ""
|
||||
|
||||
func _level_selection_changed(button):
|
||||
next_scene_path = selected_level_base_path + button.text + ".tscn"
|
||||
next_scene_path = selected_level_base_path + button.text + ".tscn"
|
||||
|
||||
@ -10,33 +10,33 @@ onready var signal_manager := get_tree().root.get_child(4).get_node("%SignalMana
|
||||
|
||||
|
||||
func _ready():
|
||||
#TODO Connect what HOW?
|
||||
signal_manager.connect("currency_updated", self, "update_interface")
|
||||
signal_manager.connect("terminal_activated", self, "start_timer")
|
||||
update_interface()
|
||||
#TODO Connect what HOW?
|
||||
signal_manager.connect("currency_updated", self, "update_interface")
|
||||
signal_manager.connect("terminal_activated", self, "start_timer")
|
||||
update_interface()
|
||||
|
||||
func _process(delta):
|
||||
if timer.visible:
|
||||
timer.text = String(round($HUDOverlay/GetBackTimer/Timer.time_left))
|
||||
if timer.visible:
|
||||
timer.text = String(round($HUDOverlay/GetBackTimer/Timer.time_left))
|
||||
|
||||
func start_timer(time):
|
||||
timer.visible = true
|
||||
$HUDOverlay/GetBackTimer/Timer.wait_time = time
|
||||
$HUDOverlay/GetBackTimer/Timer.start()
|
||||
$HUDOverlay/GetBackTimer/AnimationPlayer.play("Redlight")
|
||||
_zoom_timer()
|
||||
timer.visible = true
|
||||
$HUDOverlay/GetBackTimer/Timer.wait_time = time
|
||||
$HUDOverlay/GetBackTimer/Timer.start()
|
||||
$HUDOverlay/GetBackTimer/AnimationPlayer.play("Redlight")
|
||||
_zoom_timer()
|
||||
|
||||
|
||||
func _zoom_timer() -> void:
|
||||
var tween := create_tween()
|
||||
tween.parallel().tween_property(timer, "rect_position", Vector2(295, 0), 1.0)
|
||||
tween.parallel().tween_property(timer, "rect_scale", Vector2(1,1), 1.0)
|
||||
var tween := create_tween()
|
||||
tween.parallel().tween_property(timer, "rect_position", Vector2(295, 0), 1.0)
|
||||
tween.parallel().tween_property(timer, "rect_scale", Vector2(1,1), 1.0)
|
||||
|
||||
|
||||
func update_interface() -> void:
|
||||
var wallet = GlobalState.gsr.wallet
|
||||
if level_state != null:
|
||||
wallet += level_state.currency
|
||||
var wallet = GlobalState.gsr.wallet
|
||||
if level_state != null:
|
||||
wallet += level_state.currency
|
||||
|
||||
currency.text = "Orbs: %s" % wallet
|
||||
currency.text = "Orbs: %s" % wallet
|
||||
|
||||
|
||||
@ -11,58 +11,58 @@ var paused := false setget set_paused
|
||||
var block_ui_cancel = false
|
||||
|
||||
func _ready():
|
||||
#signal_manager.connect("player_died", self, "_on_GlobalState_player_died")
|
||||
$ControlsMenu.visible = false
|
||||
$ControlsMenu.set_process_input(false)
|
||||
$AudioMenu.set_process_input(false)
|
||||
signal_manager.connect("game_paused", self, "set_paused")
|
||||
pass
|
||||
#signal_manager.connect("player_died", self, "_on_GlobalState_player_died")
|
||||
$ControlsMenu.visible = false
|
||||
$ControlsMenu.set_process_input(false)
|
||||
$AudioMenu.set_process_input(false)
|
||||
signal_manager.connect("game_paused", self, "set_paused")
|
||||
pass
|
||||
|
||||
func open_audio_menu():
|
||||
block_ui_cancel = true
|
||||
pause_overlay.visible = false
|
||||
$AudioMenu.visible = true
|
||||
$AudioMenu.set_process_input(true)
|
||||
$"%MasterSlider".grab_focus()
|
||||
block_ui_cancel = true
|
||||
pause_overlay.visible = false
|
||||
$AudioMenu.visible = true
|
||||
$AudioMenu.set_process_input(true)
|
||||
$"%MasterSlider".grab_focus()
|
||||
|
||||
func close_audio_menu():
|
||||
$AudioMenu.visible = false
|
||||
pause_overlay.visible = true
|
||||
$AudioMenu.set_process_input(false)
|
||||
$"%Continue".grab_focus()
|
||||
get_tree().set_input_as_handled()
|
||||
$AudioMenu.visible = false
|
||||
pause_overlay.visible = true
|
||||
$AudioMenu.set_process_input(false)
|
||||
$"%Continue".grab_focus()
|
||||
get_tree().set_input_as_handled()
|
||||
|
||||
|
||||
func _on_GlobalState_player_died() -> void:
|
||||
self.paused = true
|
||||
pause_title.text = "You lost"
|
||||
self.paused = true
|
||||
pause_title.text = "You lost"
|
||||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if !event.is_action("pause"):
|
||||
return
|
||||
if block_ui_cancel || $"%ControlsMenu".visible:
|
||||
block_ui_cancel = false
|
||||
get_tree().set_input_as_handled()
|
||||
return
|
||||
#not oder ! schaltet einen boolean um
|
||||
#Ist self hier notwendig?
|
||||
if !event.is_action("pause"):
|
||||
return
|
||||
if block_ui_cancel || $"%ControlsMenu".visible:
|
||||
block_ui_cancel = false
|
||||
get_tree().set_input_as_handled()
|
||||
return
|
||||
#not oder ! schaltet einen boolean um
|
||||
#Ist self hier notwendig?
|
||||
|
||||
self.paused = not paused
|
||||
block_ui_cancel = true
|
||||
self.paused = not paused
|
||||
block_ui_cancel = true
|
||||
|
||||
|
||||
func set_paused(value: bool) -> void:
|
||||
paused = value
|
||||
get_tree().paused = value
|
||||
pause_overlay.visible = value
|
||||
if value == true:
|
||||
$"%Continue".grab_focus()
|
||||
paused = value
|
||||
get_tree().paused = value
|
||||
pause_overlay.visible = value
|
||||
if value == true:
|
||||
$"%Continue".grab_focus()
|
||||
|
||||
|
||||
func _on_Controls_button_up() -> void:
|
||||
$ControlsMenu.visible = true
|
||||
$ControlsMenu.set_process_input(true)
|
||||
block_ui_cancel = true
|
||||
pause_overlay.visible = false
|
||||
$"%ProfilesMenu".grab_focus()
|
||||
$ControlsMenu.visible = true
|
||||
$ControlsMenu.set_process_input(true)
|
||||
block_ui_cancel = true
|
||||
pause_overlay.visible = false
|
||||
$"%ProfilesMenu".grab_focus()
|
||||
|
||||
@ -88,7 +88,6 @@ theme = ExtResource( 2 )
|
||||
script = ExtResource( 5 )
|
||||
|
||||
[node name="ControlsMenu" type="Control" parent="."]
|
||||
physics_interpolation_mode = 1
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
anchor_right = 1.0
|
||||
@ -450,7 +449,6 @@ text = "Quit Don't Save"
|
||||
script = ExtResource( 23 )
|
||||
|
||||
[node name="AudioMenu" type="Control" parent="."]
|
||||
physics_interpolation_mode = 1
|
||||
visible = false
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
@ -685,7 +683,6 @@ text = "80"
|
||||
align = 1
|
||||
|
||||
[node name="PauseOverlay" type="TextureRect" parent="."]
|
||||
physics_interpolation_mode = 1
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
anchor_right = 1.0
|
||||
@ -792,6 +789,7 @@ volume_db = -10.0
|
||||
[connection signal="button_up" from="ControlsMenu/ReallyQuitMenu/VBoxContainer/ContinueEdit" to="ControlsMenu/ReallyQuitMenu" method="close"]
|
||||
[connection signal="button_up" from="ControlsMenu/ReallyQuitMenu/VBoxContainer/QuitDontSave" to="ControlsMenu" method="close"]
|
||||
[connection signal="button_up" from="AudioMenu/Panel/Back" to="." method="close_audio_menu"]
|
||||
[connection signal="button_up" from="AudioMenu/Panel/Back" to="AudioMenu" method="save"]
|
||||
[connection signal="button_up" from="PauseOverlay/Panel/VBoxContainer/Continue" to="PauseOverlay/Panel/VBoxContainer/Continue" method="_on_button_up"]
|
||||
[connection signal="button_up" from="PauseOverlay/Panel/VBoxContainer/Controls" to="." method="_on_Controls_button_up"]
|
||||
[connection signal="button_up" from="PauseOverlay/Panel/VBoxContainer/Audio" to="." method="open_audio_menu"]
|
||||
|
||||
@ -4,14 +4,14 @@ export(String, FILE) onready var bus_resource_path = "res://src/Sounds/default_b
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
if visible:
|
||||
$"%MasterSlider".grab_focus()
|
||||
if visible:
|
||||
$"%MasterSlider".grab_focus()
|
||||
|
||||
func save() ->void:
|
||||
var new_resource = AudioServer.generate_bus_layout()
|
||||
ResourceSaver.save(bus_resource_path, new_resource)
|
||||
var new_resource = AudioServer.generate_bus_layout()
|
||||
ResourceSaver.save(bus_resource_path, new_resource)
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if visible && event.is_action("ui_cancel"):
|
||||
$Panel/Back.emit_signal("button_up")
|
||||
if visible && event.is_action("ui_cancel"):
|
||||
$Panel/Back.emit_signal("button_up")
|
||||
|
||||
|
||||
@ -8,46 +8,46 @@ onready var vbox: VBoxContainer = $VBoxContainer
|
||||
var prev_checkbox
|
||||
|
||||
func _ready() -> void:
|
||||
BUTTON_GROUP.connect("pressed", $"%PlayButton", "_level_selection_changed")
|
||||
_fill_level_list()
|
||||
BUTTON_GROUP.connect("pressed", $"%PlayButton", "_level_selection_changed")
|
||||
_fill_level_list()
|
||||
|
||||
func _fill_level_list():
|
||||
var levels = []
|
||||
var dir = Directory.new()
|
||||
if dir.open(LEVELS_PATH) == OK:
|
||||
dir.list_dir_begin()
|
||||
while true:
|
||||
var file_name = dir.get_next()
|
||||
if file_name == "":
|
||||
break
|
||||
else:
|
||||
if(file_name.ends_with(".tscn")):
|
||||
levels.append(file_name)
|
||||
if levels.size() != 0:
|
||||
_spawn_level_options(levels)
|
||||
var levels = []
|
||||
var dir = Directory.new()
|
||||
if dir.open(LEVELS_PATH) == OK:
|
||||
dir.list_dir_begin()
|
||||
while true:
|
||||
var file_name = dir.get_next()
|
||||
if file_name == "":
|
||||
break
|
||||
else:
|
||||
if(file_name.ends_with(".tscn")):
|
||||
levels.append(file_name)
|
||||
if levels.size() != 0:
|
||||
_spawn_level_options(levels)
|
||||
|
||||
func _spawn_level_options(levels: Array):
|
||||
var first = true
|
||||
for level in levels:
|
||||
var level_check_box = LEVEL_CHECK_BOX.instance()
|
||||
vbox.add_child(level_check_box)
|
||||
level_check_box.initialize_with_progress(LEVELS_PATH + level)
|
||||
var check_box = level_check_box.get_node("CheckBox")
|
||||
check_box.focus_mode = Control.FOCUS_ALL
|
||||
check_box.focus_neighbour_left = $"%PlayButton".get_path()
|
||||
check_box.text = level.trim_suffix(".tscn")
|
||||
check_box.set_button_group(BUTTON_GROUP)
|
||||
if first:
|
||||
$"%PlayButton".focus_neighbour_right = check_box.get_path()
|
||||
$"%Controlls".focus_neighbour_right = check_box.get_path()
|
||||
$"%QuitButton".focus_neighbour_right = check_box.get_path()
|
||||
check_box.pressed = true
|
||||
prev_checkbox = check_box
|
||||
first = false
|
||||
else:
|
||||
prev_checkbox.focus_neighbour_bottom = check_box.get_path()
|
||||
check_box.focus_neighbour_top = prev_checkbox.get_path()
|
||||
prev_checkbox = check_box
|
||||
if GlobalState.gsr.last_played_level.ends_with(level):
|
||||
check_box.pressed = true
|
||||
return
|
||||
var first = true
|
||||
for level in levels:
|
||||
var level_check_box = LEVEL_CHECK_BOX.instance()
|
||||
vbox.add_child(level_check_box)
|
||||
level_check_box.initialize_with_progress(LEVELS_PATH + level)
|
||||
var check_box = level_check_box.get_node("CheckBox")
|
||||
check_box.focus_mode = Control.FOCUS_ALL
|
||||
check_box.focus_neighbour_left = $"%PlayButton".get_path()
|
||||
check_box.text = level.trim_suffix(".tscn")
|
||||
check_box.set_button_group(BUTTON_GROUP)
|
||||
if first || GlobalState.gsr.last_played_level.ends_with(level):
|
||||
$"%PlayButton".focus_neighbour_right = check_box.get_path()
|
||||
$"%Controlls".focus_neighbour_right = check_box.get_path()
|
||||
$"%Audio".focus_neighbour_right = check_box.get_path()
|
||||
$"%QuitButton".focus_neighbour_right = check_box.get_path()
|
||||
check_box.pressed = true
|
||||
first = false
|
||||
yield(get_tree(), "idle_frame")
|
||||
ensure_control_visible(check_box)
|
||||
if prev_checkbox != null:
|
||||
prev_checkbox.focus_neighbour_bottom = check_box.get_path()
|
||||
check_box.focus_neighbour_top = prev_checkbox.get_path()
|
||||
prev_checkbox = check_box
|
||||
return
|
||||
|
||||
@ -2,5 +2,5 @@ extends Control
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
$"%PlayButton".grab_focus()
|
||||
GlobalAudio.play_scene_independent("res://assets/music/Shopping For The Future (LOOP).wav","Music", -14, true)
|
||||
$"%PlayButton".grab_focus()
|
||||
GlobalAudio.play_scene_independent("res://assets/music/Shopping For The Future (LOOP).wav","Music", -14, true)
|
||||
|
||||
@ -22,110 +22,117 @@ var tutorial_begun = false
|
||||
var tutorial_area_entered = false
|
||||
|
||||
func check_goal_state() -> void:
|
||||
if(blobby_state == null):
|
||||
blobby_state = get_tree().root.get_child(4).get_node("%Blobby").get_node("%BlobbymationTree").get("parameters/playback")
|
||||
if(blobby_state == null):
|
||||
blobby_state = get_tree().root.get_child(4).get_node("%Blobby").get_node("%BlobbymationTree").get("parameters/playback")
|
||||
|
||||
#print(blobby_state.get_current_node())
|
||||
if(blobby_state.get_current_node() == goal_state):
|
||||
press_limit -= 1
|
||||
if press_limit == -1 :
|
||||
# Should delete itself from the progress dictionary when destroyed
|
||||
if visible:
|
||||
$Label.visible = false
|
||||
$Label2.visible = false
|
||||
$TextureRect.visible = false
|
||||
$TextureRect2.visible = false
|
||||
$TextureRect3.visible = false
|
||||
$AudioStreamPlayer.play()
|
||||
$AnimationPlayer.play("cease_4_exist")
|
||||
#print(blobby_state.get_current_node())
|
||||
if(blobby_state.get_current_node() == goal_state):
|
||||
press_limit -= 1
|
||||
if press_limit == -1 :
|
||||
# Should delete itself from the progress dictionary when destroyed
|
||||
if visible:
|
||||
$"%Label".visible = false
|
||||
$"%Label2".visible = false
|
||||
$TextureRect.visible = false
|
||||
$TextureRect2.visible = false
|
||||
$TextureRect3.visible = false
|
||||
$AudioStreamPlayer.play()
|
||||
$AnimationPlayer.play("cease_4_exist")
|
||||
|
||||
func _ready() -> void:
|
||||
# Should save itself into the progress dictionary upon creation
|
||||
if(!OS.is_debug_build()):
|
||||
level_state.register_tutorial(tutorial_text)
|
||||
if (!level_state.needs_tutorial(tutorial_text)): queue_free()
|
||||
if initial_wait_time > 0.0:
|
||||
var timer = Timer.new()
|
||||
add_child(timer)
|
||||
timer.wait_time = initial_wait_time
|
||||
timer.one_shot = true
|
||||
timer.connect("timeout",self,"finished_waiting")
|
||||
timer.start()
|
||||
$Button1/ControllerButton.path = action1
|
||||
$Button2/ControllerButton.path = action2
|
||||
$Label.text = tutorial_text
|
||||
button1.texture = $Button1/ControllerButton.icon
|
||||
button1.scale.x = 0.5
|
||||
button1.scale.y = 0.5
|
||||
button2.texture = $Button2/ControllerButton.icon
|
||||
button2.scale.x = 0.5
|
||||
button2.scale.y = 0.5
|
||||
tex_size = Vector2(button1.texture.get_width(), button1.texture.get_height()/2) * button1.scale * 0.75
|
||||
$Area/CollisionShape2D.shape.extents = tex_size
|
||||
set_physics_process(true)
|
||||
# Should save itself into the progress dictionary upon creation
|
||||
if(!OS.is_debug_build()):
|
||||
level_state.register_tutorial(tutorial_text)
|
||||
if (!level_state.needs_tutorial(tutorial_text)): queue_free()
|
||||
if initial_wait_time > 0.0:
|
||||
var timer = Timer.new()
|
||||
add_child(timer)
|
||||
timer.wait_time = initial_wait_time
|
||||
timer.one_shot = true
|
||||
timer.connect("timeout",self,"finished_waiting")
|
||||
timer.start()
|
||||
$Button1/ControllerButton.path = action1
|
||||
$Button2/ControllerButton.path = action2
|
||||
$"%Label".text = tutorial_text
|
||||
button1.texture = $Button1/ControllerButton.icon
|
||||
button1.scale.x = 0.5
|
||||
button1.scale.y = 0.5
|
||||
button2.texture = $Button2/ControllerButton.icon
|
||||
button2.scale.x = 0.5
|
||||
button2.scale.y = 0.5
|
||||
tex_size = Vector2(button1.texture.get_width(), button1.texture.get_height()/2) * button1.scale * 0.75
|
||||
$Area/CollisionShape2D.shape.extents = tex_size
|
||||
set_physics_process(true)
|
||||
|
||||
func finished_waiting() -> void:
|
||||
if(tutorial_area_entered): start_tutorial()
|
||||
if(tutorial_area_entered): start_tutorial()
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
check_goal_state()
|
||||
if(cam == null):
|
||||
cam = get_tree().root.get_child(4).get_node("%BlobbyCam")
|
||||
return
|
||||
if(moving == false): return
|
||||
button1.texture = $Button1/ControllerButton.icon
|
||||
button2.texture = $Button2/ControllerButton.icon
|
||||
# TODO process less in each frame
|
||||
var up_left_pos = cam.get_global_transform().affine_inverse() * (position - tex_size * self.scale)
|
||||
var down_right_pos = cam.get_global_transform().affine_inverse() * (position + tex_size * self.scale)
|
||||
check_goal_state()
|
||||
if(cam == null):
|
||||
cam = get_tree().root.get_child(4).get_node("%BlobbyCam")
|
||||
return
|
||||
button1.texture = $Button1/ControllerButton.icon
|
||||
button2.texture = $Button2/ControllerButton.icon
|
||||
if(moving == false): return
|
||||
# TODO process less in each frame
|
||||
var up_left_pos = cam.get_global_transform().affine_inverse() * (position - tex_size * self.scale)
|
||||
var down_right_pos = cam.get_global_transform().affine_inverse() * (position + tex_size * self.scale)
|
||||
|
||||
if up_left_pos.x <= cam.screen_left.x:
|
||||
velocity.x = abs(velocity.x)
|
||||
elif down_right_pos.x >= cam.screen_right.x:
|
||||
velocity.x = -abs(velocity.x)
|
||||
if up_left_pos.x <= cam.screen_left.x:
|
||||
velocity.x = abs(velocity.x)
|
||||
elif down_right_pos.x >= cam.screen_right.x:
|
||||
velocity.x = -abs(velocity.x)
|
||||
|
||||
if up_left_pos.y <= cam.screen_top.y:
|
||||
velocity.y = abs(velocity.y)
|
||||
elif down_right_pos.y >= cam.screen_bottom.y:
|
||||
velocity.y = -abs(velocity.y)
|
||||
if up_left_pos.y <= cam.screen_top.y:
|
||||
velocity.y = abs(velocity.y)
|
||||
elif down_right_pos.y >= cam.screen_bottom.y:
|
||||
velocity.y = -abs(velocity.y)
|
||||
|
||||
self.position += velocity
|
||||
self.position += velocity
|
||||
|
||||
|
||||
|
||||
|
||||
func _on_Area_area_entered(area: Area2D) -> void:
|
||||
var d = area.global_position - position
|
||||
print(d)
|
||||
if(abs(d.y) > tex_size.y * 2 - 1):
|
||||
velocity.y *= -1
|
||||
pass
|
||||
else:
|
||||
velocity.x *=-1
|
||||
var d = area.global_position - position
|
||||
print(d)
|
||||
if(abs(d.y) > tex_size.y * 2 - 1):
|
||||
velocity.y *= -1
|
||||
else:
|
||||
velocity.x *=-1
|
||||
|
||||
func _lesson_learned(animation_name: String) -> void:
|
||||
if(animation_name != "cease_4_exist"): return
|
||||
moving = false
|
||||
if(!OS.is_debug_build()):
|
||||
level_state.absolved_tutorial(tutorial_text)
|
||||
blobby_state = null
|
||||
queue_free()
|
||||
if(animation_name != "cease_4_exist"): return
|
||||
moving = false
|
||||
if(!OS.is_debug_build()):
|
||||
level_state.absolved_tutorial(tutorial_text)
|
||||
blobby_state = null
|
||||
queue_free()
|
||||
|
||||
func start_tutorial():
|
||||
rng.randomize()
|
||||
position.x += rng.randf_range(-100, 100)
|
||||
position.y += rng.randf_range(-100, 100)
|
||||
velocity.x = velocity.x * sign(rng.randf_range(-1,1))
|
||||
velocity.y = velocity.y * sign(rng.randf_range(-1,1))
|
||||
tutorial_begun = true
|
||||
visible = true
|
||||
moving = true
|
||||
rng.randomize()
|
||||
position.x += rng.randf_range(-100, 100)
|
||||
position.y += rng.randf_range(-100, 100)
|
||||
velocity.x = velocity.x * sign(rng.randf_range(-1,1))
|
||||
velocity.y = velocity.y * sign(rng.randf_range(-1,1))
|
||||
tutorial_begun = true
|
||||
var timer = Timer.new()
|
||||
add_child(timer)
|
||||
timer.wait_time = 0.2
|
||||
timer.one_shot = true
|
||||
timer.connect("timeout", self, "enable_visibility")
|
||||
timer.start()
|
||||
moving = true
|
||||
|
||||
func enable_visibility() -> void:
|
||||
visible = true
|
||||
|
||||
func _on_StartTutorialArea_area_entered(area: Area2D) -> void:
|
||||
tutorial_area_entered = true
|
||||
if(tutorial_begun || initial_wait_time > 0): return
|
||||
start_tutorial()
|
||||
tutorial_area_entered = true
|
||||
if(tutorial_begun || initial_wait_time > 0): return
|
||||
start_tutorial()
|
||||
|
||||
# Erkenne ob der Spieler die Aktion für die das Tutorial ist schon kann
|
||||
# Wenn der Spieler den Tutorialbereich betritte spawne das Thingy random auf dem Screen
|
||||
# Füge zwei Inputs zusammen zu einem Thingy
|
||||
# Erkenne ob der Spieler die Aktion für die das Tutorial ist schon kann
|
||||
# Wenn der Spieler den Tutorialbereich betritte spawne das Thingy random auf dem Screen
|
||||
# Füge zwei Inputs zusammen zu einem Thingy
|
||||
|
||||
@ -77,6 +77,10 @@ fill = 1
|
||||
fill_from = Vector2( 0.5, 0.5 )
|
||||
fill_to = Vector2( 0.155994, 0.791965 )
|
||||
|
||||
[sub_resource type="DynamicFont" id=14]
|
||||
size = 14
|
||||
font_data = ExtResource( 2 )
|
||||
|
||||
[sub_resource type="Gradient" id=15]
|
||||
interpolation_mode = 2
|
||||
colors = PoolColorArray( 1, 1, 1, 1, 0, 0, 0, 0 )
|
||||
@ -90,10 +94,6 @@ fill = 1
|
||||
fill_from = Vector2( 0.5, 0.5 )
|
||||
fill_to = Vector2( 0.155994, 0.791965 )
|
||||
|
||||
[sub_resource type="DynamicFont" id=14]
|
||||
size = 14
|
||||
font_data = ExtResource( 2 )
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=3]
|
||||
|
||||
[sub_resource type="Animation" id=4]
|
||||
@ -151,6 +151,10 @@ script = ExtResource( 1 )
|
||||
goal_state = "running"
|
||||
tutorial_text = "Press to run:"
|
||||
|
||||
[node name="VisibilityEnabler2D" type="VisibilityEnabler2D" parent="."]
|
||||
position = Vector2( 3.00001, -7.5 )
|
||||
scale = Vector2( 6.8, 3.85 )
|
||||
|
||||
[node name="Button1" type="Sprite" parent="."]
|
||||
physics_interpolation_mode = 2
|
||||
material = SubResource( 12 )
|
||||
@ -188,6 +192,40 @@ margin_right = 250.0
|
||||
margin_bottom = 125.0
|
||||
texture = SubResource( 8 )
|
||||
|
||||
[node name="Label" type="Label" parent="TextureRect"]
|
||||
physics_interpolation_mode = 2
|
||||
unique_name_in_owner = true
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -118.0
|
||||
margin_top = -66.0
|
||||
margin_right = 15.0
|
||||
margin_bottom = 33.0
|
||||
custom_fonts/font = ExtResource( 5 )
|
||||
text = "This is a test
|
||||
"
|
||||
align = 1
|
||||
uppercase = true
|
||||
|
||||
[node name="Label2" type="Label" parent="TextureRect"]
|
||||
physics_interpolation_mode = 2
|
||||
unique_name_in_owner = true
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -54.0
|
||||
margin_top = -31.0
|
||||
margin_right = -44.0
|
||||
margin_bottom = -18.0
|
||||
custom_fonts/font = SubResource( 14 )
|
||||
text = "+"
|
||||
align = 1
|
||||
valign = 1
|
||||
uppercase = true
|
||||
|
||||
[node name="TextureRect2" type="TextureRect" parent="."]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
@ -210,40 +248,7 @@ margin_right = 80.0
|
||||
margin_bottom = 50.0
|
||||
texture = SubResource( 11 )
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
physics_interpolation_mode = 2
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -68.0
|
||||
margin_top = -41.0
|
||||
margin_right = 65.0
|
||||
margin_bottom = 58.0
|
||||
custom_fonts/font = ExtResource( 5 )
|
||||
text = "This is a test
|
||||
"
|
||||
align = 1
|
||||
uppercase = true
|
||||
|
||||
[node name="Label2" type="Label" parent="."]
|
||||
physics_interpolation_mode = 2
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -4.0
|
||||
margin_top = -6.0
|
||||
margin_right = 6.0
|
||||
margin_bottom = 7.0
|
||||
custom_fonts/font = SubResource( 14 )
|
||||
text = "+"
|
||||
align = 1
|
||||
valign = 1
|
||||
uppercase = true
|
||||
|
||||
[node name="Area" type="Area2D" parent="."]
|
||||
visible = false
|
||||
collision_layer = 512
|
||||
collision_mask = 512
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ func _unhandled_input(event: InputEvent) -> void:
|
||||
press_limit -= 1
|
||||
if press_limit == 0:
|
||||
if visible:
|
||||
$Label.visible = false
|
||||
$"%Label".visible = false
|
||||
$TextureRect.visible = false
|
||||
$TextureRect2.visible = false
|
||||
$AudioStreamPlayer.play()
|
||||
@ -43,7 +43,7 @@ func _ready() -> void:
|
||||
timer.connect("timeout", self, "finished_waiting")
|
||||
timer.start()
|
||||
$Button/ControllerButton.path = action
|
||||
$Label.text = tutorial_text
|
||||
$"%Label".text = tutorial_text
|
||||
button.texture = $Button/ControllerButton.icon
|
||||
button.scale.x = 0.5
|
||||
button.scale.y = 0.5
|
||||
@ -65,12 +65,13 @@ func _physics_process(_delta: float) -> void:
|
||||
cam = get_tree().root.get_child(4).get_node("%BlobbyCam")
|
||||
return
|
||||
|
||||
if button.texture != $Button/ControllerButton.icon:
|
||||
button.texture = $Button/ControllerButton.icon
|
||||
|
||||
# TODO process less in each frame
|
||||
if moving == false:
|
||||
return
|
||||
|
||||
# TODO process less in each frame
|
||||
button.texture = $Button/ControllerButton.icon
|
||||
# TODO process less in each frame
|
||||
var up_left_pos = (
|
||||
cam.get_global_transform().affine_inverse()
|
||||
@ -89,8 +90,7 @@ func _physics_process(_delta: float) -> void:
|
||||
velocity.y = abs(velocity.y)
|
||||
elif down_right_pos.y >= cam.screen_bottom.y:
|
||||
velocity.y = -abs(velocity.y)
|
||||
self.position += velocity
|
||||
|
||||
position += velocity
|
||||
|
||||
func _on_Area_area_entered(area: Area2D) -> void:
|
||||
if !area.get_parent().visible:
|
||||
@ -112,17 +112,26 @@ func _lesson_learned(animation_name: String) -> void:
|
||||
queue_free()
|
||||
|
||||
|
||||
func start_tutorial():
|
||||
func start_tutorial() -> void:
|
||||
var rng = RandomNumberGenerator.new()
|
||||
rng.randomize()
|
||||
position.x += rng.randf_range(-50, 50)
|
||||
position.y += rng.randf_range(-50, 50)
|
||||
position = cam.get_global_transform() * position
|
||||
print(position)
|
||||
velocity.x = velocity.x * sign(rng.randf_range(-1, 1))
|
||||
velocity.y = velocity.y * sign(rng.randf_range(-1, 1))
|
||||
tutorial_begun = true
|
||||
visible = true
|
||||
var timer = Timer.new()
|
||||
add_child(timer)
|
||||
timer.wait_time = 0.2
|
||||
timer.one_shot = true
|
||||
timer.connect("timeout", self, "enable_visibility")
|
||||
timer.start()
|
||||
moving = true
|
||||
|
||||
func enable_visibility() -> void:
|
||||
visible = true
|
||||
|
||||
func _on_StartTutorialArea_area_entered(_area: Area2D) -> void:
|
||||
tutorial_area_entered = true
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
[gd_scene load_steps=18 format=2]
|
||||
[gd_scene load_steps=17 format=2]
|
||||
|
||||
[ext_resource path="res://assets/sounds/vibing.wav" type="AudioStream" id=1]
|
||||
[ext_resource path="res://src/UserInterface/TutorialThingy.gd" type="Script" id=2]
|
||||
[ext_resource path="res://addons/controller_icons/objects/Button.gd" type="Script" id=3]
|
||||
[ext_resource path="res://assets/environment/decor/screen/Screen3.png" type="Texture" id=4]
|
||||
[ext_resource path="res://assets/ui/fonts/kenny_thick.tres" type="DynamicFont" id=5]
|
||||
[ext_resource path="res://addons/controller_icons/assets/ps4/cross.png" type="Texture" id=6]
|
||||
[ext_resource path="res://assets/effects/noise.png" type="Texture" id=8]
|
||||
@ -140,7 +139,7 @@ tracks/1/keys = {
|
||||
extents = Vector2( 62, 71 )
|
||||
|
||||
[node name="TutorialThingy" type="Node2D"]
|
||||
physics_interpolation_mode = 2
|
||||
physics_interpolation_mode = 1
|
||||
visible = false
|
||||
z_index = 10
|
||||
script = ExtResource( 2 )
|
||||
@ -170,6 +169,25 @@ margin_right = 250.0
|
||||
margin_bottom = 125.0
|
||||
texture = SubResource( 8 )
|
||||
|
||||
[node name="Label" type="Label" parent="TextureRect"]
|
||||
physics_interpolation_mode = 2
|
||||
unique_name_in_owner = true
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -118.0
|
||||
margin_top = -66.0
|
||||
margin_right = 15.0
|
||||
margin_bottom = 33.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
custom_fonts/font = ExtResource( 5 )
|
||||
text = "This is a test
|
||||
"
|
||||
align = 1
|
||||
uppercase = true
|
||||
|
||||
[node name="TextureRect2" type="TextureRect" parent="."]
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
@ -181,24 +199,7 @@ margin_right = 50.0
|
||||
margin_bottom = 50.0
|
||||
texture = SubResource( 11 )
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
physics_interpolation_mode = 2
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -68.0
|
||||
margin_top = -41.0
|
||||
margin_right = 65.0
|
||||
margin_bottom = 58.0
|
||||
custom_fonts/font = ExtResource( 5 )
|
||||
text = "This is a test
|
||||
"
|
||||
align = 1
|
||||
uppercase = true
|
||||
|
||||
[node name="Area" type="Area2D" parent="."]
|
||||
visible = false
|
||||
collision_layer = 512
|
||||
collision_mask = 512
|
||||
|
||||
@ -209,10 +210,6 @@ shape = SubResource( 3 )
|
||||
anims/RESET = SubResource( 4 )
|
||||
anims/cease_4_exist = SubResource( 5 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
visible = false
|
||||
texture = ExtResource( 4 )
|
||||
|
||||
[node name="StartTutorialArea" type="Area2D" parent="."]
|
||||
collision_layer = 0
|
||||
monitorable = false
|
||||
@ -225,6 +222,8 @@ stream = ExtResource( 1 )
|
||||
volume_db = -17.477
|
||||
bus = "UI"
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
|
||||
[connection signal="area_entered" from="Area" to="." method="_on_Area_area_entered"]
|
||||
[connection signal="animation_finished" from="AnimationPlayer" to="." method="_lesson_learned"]
|
||||
[connection signal="area_entered" from="StartTutorialArea" to="." method="_on_StartTutorialArea_area_entered"]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user