diff options
-rw-r--r-- | components/button.tscn | 1 | ||||
-rw-r--r-- | components/textreveal.gd | 2 | ||||
-rw-r--r-- | scenes/introduction.gd | 10 | ||||
-rw-r--r-- | scenes/introduction.tscn | 17 | ||||
-rw-r--r-- | scenes/levels/base_level.tscn | 1 | ||||
-rw-r--r-- | scenes/menu.gd | 4 | ||||
-rw-r--r-- | scenes/menu.tscn | 1 | ||||
-rw-r--r-- | scenes/pause.gd | 4 |
8 files changed, 30 insertions, 10 deletions
diff --git a/components/button.tscn b/components/button.tscn index 0fda370..580ef29 100644 --- a/components/button.tscn +++ b/components/button.tscn @@ -28,7 +28,6 @@ texture = ExtResource( 1 ) [node name="Hitbox" type="CollisionShape2D" parent="."] shape = SubResource( 1 ) - [connection signal="input_event" from="." to="." method="_on_ButtonTest_input_event"] [connection signal="mouse_entered" from="." to="." method="_on_ButtonTest_mouse_entered"] [connection signal="mouse_exited" from="." to="." method="_on_ButtonTest_mouse_exited"] diff --git a/components/textreveal.gd b/components/textreveal.gd index d76282a..ed048e1 100644 --- a/components/textreveal.gd +++ b/components/textreveal.gd @@ -31,7 +31,7 @@ func _process(delta): revealed += additional text = to_render.substr(0, revealed) rect_position = -rect_size / 2 - if to_render.length() == revealed: + if to_render.length() <= revealed: started = false finished = true emit_signal("finished_reveal") diff --git a/scenes/introduction.gd b/scenes/introduction.gd index e0e8767..713e901 100644 --- a/scenes/introduction.gd +++ b/scenes/introduction.gd @@ -3,5 +3,15 @@ extends Node # Called when the node enters the scene tree for the first time. func _ready(): + $Continue.visible = false $TextReveal.start() + + +func _on_TextReveal_finished_reveal(): + $Continue.visible = true + + + +func _on_Button_on_click(): + get_tree().change_scene("res://scenes/levels/base_level.tscn") diff --git a/scenes/introduction.tscn b/scenes/introduction.tscn index 460ced3..21612bd 100644 --- a/scenes/introduction.tscn +++ b/scenes/introduction.tscn @@ -1,17 +1,18 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=4 format=2] [ext_resource path="res://components/textreveal.gd" type="Script" id=1] [ext_resource path="res://scenes/introduction.gd" type="Script" id=2] +[ext_resource path="res://components/button.tscn" type="PackedScene" id=3] [node name="CanvasLayer" type="Node2D"] position = Vector2( 654.009, 325.417 ) script = ExtResource( 2 ) [node name="TextReveal" type="Label" parent="."] -margin_left = 715.918 -margin_top = 322.242 -margin_right = 755.918 -margin_bottom = 336.242 +margin_left = -773.0 +margin_top = -16.0 +margin_right = 774.0 +margin_bottom = 366.0 script = ExtResource( 1 ) __meta__ = { "_edit_use_anchors_": false @@ -20,3 +21,9 @@ to_render = "AHAHAHAHHAHAHA Cock and ball torture (CBT), occasionally known as penis torture, dick torture or male genitorture, is a sexual activity involving application of pain or constriction to the penis or testicles. " + +[node name="Continue" parent="." instance=ExtResource( 3 )] +position = Vector2( 10, 260 ) +text = "Continue" +[connection signal="finished_reveal" from="TextReveal" to="." method="_on_TextReveal_finished_reveal"] +[connection signal="on_click" from="Continue" to="." method="_on_Button_on_click"] diff --git a/scenes/levels/base_level.tscn b/scenes/levels/base_level.tscn index b80244f..118dc63 100644 --- a/scenes/levels/base_level.tscn +++ b/scenes/levels/base_level.tscn @@ -62,5 +62,4 @@ speed = 10.0 [node name="PauseMenu" parent="." instance=ExtResource( 5 )] visible = false position = Vector2( 155.016, 424.068 ) - [connection signal="on_click" from="MenuButton" to="." method="_on_MenuButton_on_click"] diff --git a/scenes/menu.gd b/scenes/menu.gd index c0c6f6b..536410d 100644 --- a/scenes/menu.gd +++ b/scenes/menu.gd @@ -7,3 +7,7 @@ func _ready(): func _on_Exit_on_click(): get_tree().quit() + + +func _on_Strart_on_click(): + get_tree().change_scene("res://scenes/introduction.tscn") diff --git a/scenes/menu.tscn b/scenes/menu.tscn index 0a69c87..7df0a7c 100644 --- a/scenes/menu.tscn +++ b/scenes/menu.tscn @@ -33,3 +33,4 @@ fixed_width = 150 position = Vector2( 640, 250 ) rotation = -1.74846e-07 [connection signal="on_click" from="Exit" to="." method="_on_Exit_on_click"] +[connection signal="on_click" from="Strart" to="." method="_on_Strart_on_click"] diff --git a/scenes/pause.gd b/scenes/pause.gd index 43a2d5b..57ab574 100644 --- a/scenes/pause.gd +++ b/scenes/pause.gd @@ -6,7 +6,7 @@ onready var backgroud = $Sprite func pause(): pause_menu.visible = true pause_menu.pause_mode = PAUSE_MODE_PROCESS # to be save - get_tree().paused = true + # get_tree().paused = true func _ready(): @@ -15,7 +15,7 @@ func _ready(): func _on_Resume_on_click(): pause_menu.visible = false - get_tree().paused = false + # get_tree().paused = false func _on_Main_Menu_on_click(): |