gameover screen and end screen edit

This commit is contained in:
dukegoobler 2023-01-03 17:08:43 -07:00
parent f240651ef2
commit ba1409217c
10 changed files with 125 additions and 34 deletions

View File

@ -27,12 +27,6 @@
"type": 0, "type": 0,
"value": "0" "value": "0"
}, },
{
"id": "1672728461-648",
"name": "flashlight_seconds",
"type": 0,
"value": "0.0"
},
{ {
"id": "1672730872-648", "id": "1672730872-648",
"name": "have seen elevator", "name": "have seen elevator",
@ -62,6 +56,12 @@
"name": "joined meat", "name": "joined meat",
"type": 0, "type": 0,
"value": "false" "value": "false"
},
{
"id": "1672728461-648",
"name": "flashlight_seconds",
"type": 0,
"value": "0.0"
} }
] ]
} }

View File

@ -152,41 +152,35 @@
"character": "", "character": "",
"event_id": "dialogic_001", "event_id": "dialogic_001",
"portrait": "", "portrait": "",
"text": "You have fallen" "text": "Unable to stand on broken legs, you slowly begin to sink"
}, },
{ {
"character": "", "character": "",
"event_id": "dialogic_001", "event_id": "dialogic_001",
"portrait": "", "portrait": "",
"text": "Unable to stand on broken legs, you slowly begin to sink. Your screams for help are left unanswered until the meat smothers you in its warm embrace" "text": "Your screams for help are left unanswered as the meat smothers you in its warm embrace"
}, },
{ {
"audio": "play", "audio": "play",
"audio_bus": "Master", "audio_bus": "Master",
"event_id": "dialogic_030", "event_id": "dialogic_030",
"event_name": "AudioEvent", "event_name": "AudioEvent",
"file": "res://assets/audio/neural_scanner_sfx.wav", "file": "res://assets/audio/button_press.ogg",
"volume": 0 "volume": 0
}, },
{ {
"character": "", "character": "",
"event_id": "dialogic_001", "event_id": "dialogic_001",
"portrait": "", "portrait": "",
"text": " (Your neural scanner blinks for the last time) " "text": "(SHUTTING DOWN. PLEASE AWAIT RECOVERY)\n\n[pause=2]"
}, },
{ {
"character": "", "change_scene": "res://screens/EndScreen_Planet.tscn",
"event_id": "dialogic_001", "event_id": "dialogic_041"
"portrait": "",
"text": "SHUTTING DOWN. PLEASE AWAIT RECOVERY"
},
{
"emit_signal": "",
"event_id": "dialogic_040"
}, },
{ {
"event_id": "dialogic_022", "event_id": "dialogic_022",
"transition_duration": 0 "transition_duration": 2
} }
], ],
"metadata": { "metadata": {

View File

@ -4,6 +4,5 @@ extends MeshInstance
var has_played_animation = false var has_played_animation = false
func _on_Area_body_entered(body: Node): func _on_Area_body_entered(body: Node):
if body.name == "OnFootPhysics" and not has_played_animation: if body.get_name() == "camerabody":
has_played_animation = true
get_active_material(0).set_shader_param("start_time", Time.get_ticks_msec() / 1000.0) get_active_material(0).set_shader_param("start_time", Time.get_ticks_msec() / 1000.0)

View File

@ -114,7 +114,7 @@ shader_param/normal_map = ExtResource( 2 )
extents = Vector3( 1.72965, 1.52498, 0.0716956 ) extents = Vector3( 1.72965, 1.52498, 0.0716956 )
[sub_resource type="BoxShape" id=4] [sub_resource type="BoxShape" id=4]
extents = Vector3( 1, 1, 1.66041 ) extents = Vector3( 0.415364, 0.271899, 0.607307 )
[node name="WallStruggler" type="MeshInstance"] [node name="WallStruggler" type="MeshInstance"]
transform = Transform( 0.75, 0, 0, 0, 0.75, 0, 0, 0, 0.75, 0, 0, 0 ) transform = Transform( 0.75, 0, 0, 0, 0.75, 0, 0, 0, 0.75, 0, 0, 0 )
@ -132,7 +132,7 @@ shape = SubResource( 3 )
[node name="Area" type="Area" parent="."] [node name="Area" type="Area" parent="."]
[node name="CollisionShape" type="CollisionShape" parent="Area"] [node name="CollisionShape" type="CollisionShape" parent="Area"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1.52395, 0, 0, 1.72382 ) transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1.52395, 0, -0.135652, 1.12392 )
shape = SubResource( 4 ) shape = SubResource( 4 )
[connection signal="body_entered" from="Area" to="." method="_on_Area_body_entered"] [connection signal="body_entered" from="Area" to="." method="_on_Area_body_entered"]

View File

@ -15,11 +15,8 @@ func _on_Credits_pressed():
var dialog = Dialogic.start("credits") var dialog = Dialogic.start("credits")
add_child(dialog) add_child(dialog)
func _on_Controls_pressed():
var dialog = Dialogic.start("controls")
add_child(dialog)
func _on_QuitButton_pressed(): func _on_QuitButton_pressed():
get_tree().quit()
func _on_MenuButton_pressed():
get_tree().change_scene("res://screens/TitleScreen_Planet.tscn") get_tree().change_scene("res://screens/TitleScreen_Planet.tscn")

View File

@ -127,7 +127,7 @@ margin_bottom = 80.0
size_flags_vertical = 3 size_flags_vertical = 3
text = "Play Again" text = "Play Again"
[node name="QuitButton" type="Button" parent="EndMenu/ButtonContainer"] [node name="MenuButton" type="Button" parent="EndMenu/ButtonContainer"]
margin_top = 90.0 margin_top = 90.0
margin_right = 300.0 margin_right = 300.0
margin_bottom = 170.0 margin_bottom = 170.0
@ -141,12 +141,12 @@ margin_bottom = 260.0
size_flags_vertical = 3 size_flags_vertical = 3
text = "Credits" text = "Credits"
[node name="Controls" type="Button" parent="EndMenu/ButtonContainer"] [node name="QuitButton" type="Button" parent="EndMenu/ButtonContainer"]
margin_top = 270.0 margin_top = 270.0
margin_right = 300.0 margin_right = 300.0
margin_bottom = 350.0 margin_bottom = 350.0
size_flags_vertical = 3 size_flags_vertical = 3
text = "Controls" text = "Quit"
[node name="BlackoutScreen" type="CanvasLayer" parent="EndMenu"] [node name="BlackoutScreen" type="CanvasLayer" parent="EndMenu"]
layer = 2 layer = 2
@ -168,6 +168,6 @@ stream = ExtResource( 7 )
[node name="grainy_shader" parent="EndMenu" instance=ExtResource( 2 )] [node name="grainy_shader" parent="EndMenu" instance=ExtResource( 2 )]
[connection signal="pressed" from="EndMenu/ButtonContainer/PlayButton" to="EndMenu" method="_on_PlayButton_pressed"] [connection signal="pressed" from="EndMenu/ButtonContainer/PlayButton" to="EndMenu" method="_on_PlayButton_pressed"]
[connection signal="pressed" from="EndMenu/ButtonContainer/QuitButton" to="EndMenu" method="_on_QuitButton_pressed"] [connection signal="pressed" from="EndMenu/ButtonContainer/MenuButton" to="EndMenu" method="_on_MenuButton_pressed"]
[connection signal="pressed" from="EndMenu/ButtonContainer/Credits" to="EndMenu" method="_on_Credits_pressed"] [connection signal="pressed" from="EndMenu/ButtonContainer/Credits" to="EndMenu" method="_on_Credits_pressed"]
[connection signal="pressed" from="EndMenu/ButtonContainer/Controls" to="EndMenu" method="_on_Controls_pressed"] [connection signal="pressed" from="EndMenu/ButtonContainer/QuitButton" to="EndMenu" method="_on_QuitButton_pressed"]

View File

@ -0,0 +1,15 @@
extends Spatial
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
$blackscreen.visible = false
var dialog = Dialogic.start("end")
add_child(dialog)
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass

View File

@ -0,0 +1,82 @@
[gd_scene load_steps=8 format=2]
[ext_resource path="res://effects/grainy_shader.tscn" type="PackedScene" id=1]
[ext_resource path="res://effects/WorldEnvironment.tscn" type="PackedScene" id=2]
[ext_resource path="res://screens/end_wall_struggler.gd" type="Script" id=3]
[ext_resource path="res://effects/npc/wall_struggler/containing_tube.tscn" type="PackedScene" id=4]
[ext_resource path="res://effects/npc/wall_struggler/WallStruggler.tscn" type="PackedScene" id=5]
[sub_resource type="BoxShape" id=2]
[sub_resource type="Animation" id=1]
resource_name = "struggler_camera"
length = 10.0
tracks/0/type = "transform"
tracks/0/path = NodePath("Camera")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = PoolRealArray( 0.1, 1, 0, -0.239693, 4.30081, 0, 0, 0, 1, 1, 1, 1, 8.4, 1, 0, -0.377647, 1.43717, 0.0871558, 0, 0, 0.996195, 1, 1, 1 )
tracks/1/type = "value"
tracks/1/path = NodePath("blackscreen:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0.2, 9.1 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 1,
"values": [ false, true ]
}
[node name="end_wall_struggler" type="Spatial"]
script = ExtResource( 3 )
[node name="blackscreen" type="ColorRect" parent="."]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
mouse_filter = 2
color = Color( 0, 0, 0, 1 )
[node name="WallStruggler" parent="." instance=ExtResource( 5 )]
transform = Transform( 0.749922, 0, 0, 0, 0.749922, 0, 0, 0, 0.749922, 0, 0, 0 )
[node name="containing_tube" parent="." instance=ExtResource( 4 )]
transform = Transform( 0.9, 0, 0, 0, 0.75, 0, 0, 0, 1, 0, 0, 0 )
[node name="WorldEnvironment" parent="." instance=ExtResource( 2 )]
[node name="shader" parent="." instance=ExtResource( 1 )]
[node name="Camera" type="Camera" parent="."]
transform = Transform( 1, 0, 0, 0, 0.999998, -0.00210281, 0, 0.00210281, 0.999998, 0, -0.240553, 4.28295 )
fov = 50.0
[node name="SpotLight" type="SpotLight" parent="Camera"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00221238, 0.144251, -0.293633 )
light_color = Color( 0.745098, 0.345098, 0.235294, 1 )
light_energy = 0.25
shadow_enabled = true
spot_range = 10.0
spot_angle = 30.0
[node name="camerabody" type="StaticBody" parent="Camera"]
[node name="CollisionShape" type="CollisionShape" parent="Camera/camerabody"]
transform = Transform( 0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0 )
shape = SubResource( 2 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
autoplay = "struggler_camera"
anims/struggler_camera = SubResource( 1 )
[node name="OmniLight" type="OmniLight" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.00532484, 2.38419e-07, 3.59843 )
light_color = Color( 0, 0.615686, 0.713726, 1 )
light_energy = 2.0
light_negative = true
light_specular = 0.0
shadow_enabled = true

View File

@ -26,6 +26,7 @@ shape = SubResource( 2 )
[node name="Player" parent="." instance=ExtResource( 1 )] [node name="Player" parent="." instance=ExtResource( 1 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.750395, 5.35377 ) transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.750395, 5.35377 )
can_glide = true
[node name="clark" parent="." instance=ExtResource( 3 )] [node name="clark" parent="." instance=ExtResource( 3 )]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -13.7138, 0, -1.96286 ) transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -13.7138, 0, -1.96286 )

View File

@ -20,3 +20,6 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.249605, 3.63602 )
[node name="WorldEnvironment" parent="." instance=ExtResource( 5 )] [node name="WorldEnvironment" parent="." instance=ExtResource( 5 )]
[node name="shader" parent="." instance=ExtResource( 4 )] [node name="shader" parent="." instance=ExtResource( 4 )]
[node name="Camera" type="Camera" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2.58877 )