Mission system implementation for intro, alertness marker test
This commit is contained in:
parent
7e673de5ca
commit
71e42c0372
25 changed files with 312 additions and 26 deletions
17
README.md
17
README.md
|
|
@ -1,8 +1,17 @@
|
|||
# Super Space Game
|
||||
|
||||
A full remake of my previous Space Game with far more features, content and functionality. The only borrowed assets from the original game are specific sound effects.
|
||||
18 September, 2140 [EARTH STANDARD TIME]. Ash Milian wakes up from a coma. Remembering nothing about the world or their life, you must fly around the C022 solar system as a mercenary to find answers to who you are, and why you're here.
|
||||
|
||||
## Credits
|
||||
A full remake of my previous Space Game with far more features, content and functionality. The only borrowed assets from the original game are sound effects, and also the code for stars. Turns out that's hard to do right.
|
||||
|
||||
Space station music themes from Roblox 3008 OST by uglyburger0
|
||||
Input icons by Kenney (they're really good, you can find them [here](https://kenney.nl/assets/input-prompts))
|
||||
## Hints for testers
|
||||
I bit off a bit more than I could chew, and therefore this project got bigger than intended. Treat this as a very early alpha build of sorts.
|
||||
|
||||
- In your ship, you can press the SELECT/SHARE/- button on your controller to open the navagent. You can fast travel and pick up contracts.
|
||||
- The only real content is in the intro and contracts.
|
||||
- In the intro, you probably shouldn't fight the enemies that chase you. They are very beefy.
|
||||
|
||||
The following hints require the console, which can be opened with the TILDE key (the key with ~ on it, usually below [ESC].)
|
||||
|
||||
- You can use `summon_enemy` in the console while in space to summon an enemy ship behind you.
|
||||
- Unable to unholster your gun? Use the console command `give_ground_gun pistol` and try again.
|
||||
|
|
|
|||
9
scenes/alertness_marker.tscn
Normal file
9
scenes/alertness_marker.tscn
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://bav8ogrhgycaw"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cfuclgb21yw7n" path="res://textures/navigation_marker.png" id="1_i4ju7"]
|
||||
[ext_resource type="Script" uid="uid://ddwxm6i060srm" path="res://scripts/navigation_marker.gd" id="2_yh82h"]
|
||||
|
||||
[node name="AlertnessMarker" type="Sprite2D"]
|
||||
modulate = Color(1, 0, 0, 1)
|
||||
texture = ExtResource("1_i4ju7")
|
||||
script = ExtResource("2_yh82h")
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=42 format=4 uid="uid://bauklhpieuivd"]
|
||||
[gd_scene load_steps=43 format=4 uid="uid://bauklhpieuivd"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://d0qswyhwbhdua" path="res://scripts/game.gd" id="1_u5sy4"]
|
||||
[ext_resource type="Texture2D" uid="uid://dtwo7g0ipc4k" path="res://textures/ship_1.png" id="1_uwrxv"]
|
||||
|
|
@ -21,6 +21,7 @@
|
|||
[ext_resource type="Theme" uid="uid://dtc7h6gpwpend" path="res://scenes/ui.tres" id="15_ir15t"]
|
||||
[ext_resource type="FontFile" uid="uid://donsvh2l775rb" path="res://fonts/Doto.ttf" id="16_1kice"]
|
||||
[ext_resource type="PackedScene" uid="uid://b6bq2viqao61m" path="res://scenes/pause_menu.tscn" id="19_37s47"]
|
||||
[ext_resource type="PackedScene" uid="uid://behjlujs230r2" path="res://scenes/mission_objectives.tscn" id="21_bt5mj"]
|
||||
[ext_resource type="Texture2D" uid="uid://cwa4uu7hrw2l0" path="res://textures/save_indicator.png" id="22_bt5mj"]
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_ir15t"]
|
||||
|
|
@ -193,8 +194,7 @@ rotation = 3.1415927
|
|||
position = Vector2(0, -9000)
|
||||
texture = ExtResource("10_dinhu")
|
||||
|
||||
[node name="NavigationMarker" parent="Navring" node_paths=PackedStringArray("destination") instance=ExtResource("5_264po")]
|
||||
destination = NodePath("../../Orbits/SpaceStation1/space_station_1")
|
||||
[node name="NavigationMarker" parent="Navring" instance=ExtResource("5_264po")]
|
||||
|
||||
[node name="Player" type="RigidBody2D" parent="."]
|
||||
position = Vector2(-78, -9043)
|
||||
|
|
@ -646,6 +646,11 @@ script = ExtResource("15_ca42v")
|
|||
action_name = "navpanel"
|
||||
metadata/_custom_type_script = "uid://b2maxk5g6yb0i"
|
||||
|
||||
[node name="MissionObjectives" parent="UI/Control" instance=ExtResource("21_bt5mj")]
|
||||
layout_mode = 1
|
||||
offset_left = -256.0
|
||||
offset_bottom = 69.0
|
||||
|
||||
[node name="SaveIndicator" type="Control" parent="UI/Control"]
|
||||
visible = false
|
||||
custom_minimum_size = Vector2(64, 64)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=34 format=3 uid="uid://by43ihcec8e8q"]
|
||||
[gd_scene load_steps=37 format=3 uid="uid://by43ihcec8e8q"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b2sw6ymaf4t0s" path="res://scripts/game_ground.gd" id="1_6ra5r"]
|
||||
[ext_resource type="Script" uid="uid://dowu512otgyyf" path="res://scripts/player_ground.gd" id="3_8gbjj"]
|
||||
|
|
@ -11,10 +11,13 @@
|
|||
[ext_resource type="Shader" uid="uid://d3hoh7ec2w8q7" path="res://scripts/outline.gdshader" id="7_vuhkc"]
|
||||
[ext_resource type="Shader" uid="uid://d2e0541hawkml" path="res://scripts/vignette.gdshader" id="9_5vwr8"]
|
||||
[ext_resource type="Shader" uid="uid://bk7q00br1ms30" path="res://scripts/retro.gdshader" id="9_257nh"]
|
||||
[ext_resource type="PackedScene" uid="uid://bav8ogrhgycaw" path="res://scenes/alertness_marker.tscn" id="9_hby33"]
|
||||
[ext_resource type="Script" uid="uid://s7dwusi00l3v" path="res://scripts/alertness_marker.gd" id="10_e3s4u"]
|
||||
[ext_resource type="Texture2D" uid="uid://cwa4uu7hrw2l0" path="res://textures/save_indicator.png" id="13_176r3"]
|
||||
[ext_resource type="PackedScene" uid="uid://b6bq2viqao61m" path="res://scenes/pause_menu.tscn" id="14_vuhkc"]
|
||||
[ext_resource type="Texture2D" uid="uid://dauoebs801ngm" path="res://addons/super_awesome_input_icons/textures/keyboard/question.png" id="16_e3s4u"]
|
||||
[ext_resource type="Script" uid="uid://b2maxk5g6yb0i" path="res://addons/super_awesome_input_icons/classes/input_icon_texture_rect.gd" id="16_hby33"]
|
||||
[ext_resource type="PackedScene" uid="uid://behjlujs230r2" path="res://scenes/mission_objectives.tscn" id="18_e3s4u"]
|
||||
[ext_resource type="PackedScene" uid="uid://dhcfrsf726k68" path="res://scenes/dialogue_select_button.tscn" id="19_qqas2"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_jo68p"]
|
||||
|
|
@ -214,6 +217,9 @@ collision_mask = 2
|
|||
shape = SubResource("CapsuleShape2D_8gbjj")
|
||||
debug_color = Color(1, 0, 0, 0.41960785)
|
||||
|
||||
[node name="AlertnessMarker" parent="PlayerGround" instance=ExtResource("9_hby33")]
|
||||
script = ExtResource("10_e3s4u")
|
||||
|
||||
[node name="UI" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="Vignette" type="ColorRect" parent="UI"]
|
||||
|
|
@ -513,6 +519,11 @@ frame_progress = 0.6029871
|
|||
[node name="PauseMenu" parent="UI/Control" instance=ExtResource("14_vuhkc")]
|
||||
layout_mode = 1
|
||||
|
||||
[node name="MissionObjectives" parent="UI/Control" instance=ExtResource("18_e3s4u")]
|
||||
layout_mode = 1
|
||||
offset_left = -256.0
|
||||
offset_bottom = 69.0
|
||||
|
||||
[node name="Shader" type="ColorRect" parent="UI"]
|
||||
material = SubResource("ShaderMaterial_ypt7u")
|
||||
anchors_preset = 15
|
||||
|
|
|
|||
|
|
@ -354,6 +354,12 @@ position = Vector2(1360, -1072)
|
|||
[node name="CollisionShape" type="CollisionShape2D" parent="HospitalEscapeD2State2"]
|
||||
shape = SubResource("CircleShape2D_janyw")
|
||||
|
||||
[node name="HospitalEscapeD2State3" type="Area2D" parent="."]
|
||||
position = Vector2(1344, -624)
|
||||
|
||||
[node name="CollisionShape" type="CollisionShape2D" parent="HospitalEscapeD2State3"]
|
||||
shape = SubResource("CircleShape2D_janyw")
|
||||
|
||||
[node name="Doctor2" type="CharacterBody2D" parent="."]
|
||||
position = Vector2(1664, -1328)
|
||||
script = ExtResource("16_bhfm6")
|
||||
|
|
@ -762,5 +768,6 @@ bus = &"Sound Effects"
|
|||
[connection signal="body_exited" from="Doctor/InteractArea" to="Doctor/InteractArea" method="_on_body_exited"]
|
||||
[connection signal="body_entered" from="HospitalEscapeD2State1" to="Doctor2" method="_on_state_1_body_entered"]
|
||||
[connection signal="body_entered" from="HospitalEscapeD2State2" to="Doctor2" method="_on_state_2_body_entered"]
|
||||
[connection signal="body_entered" from="HospitalEscapeD2State3" to="Doctor2" method="_on_state_3_body_entered"]
|
||||
[connection signal="body_entered" from="ExitShip/InteractArea" to="ExitShip/InteractArea" method="_on_body_entered"]
|
||||
[connection signal="body_exited" from="ExitShip/InteractArea" to="ExitShip/InteractArea" method="_on_body_exited"]
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
34
scenes/mission_objectives.tscn
Normal file
34
scenes/mission_objectives.tscn
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://behjlujs230r2"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ceua7bjh8xokf" path="res://scripts/mission_objectives.gd" id="1_pg0np"]
|
||||
[ext_resource type="FontFile" uid="uid://donsvh2l775rb" path="res://fonts/Doto.ttf" id="2_80tcl"]
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_2tk4m"]
|
||||
font = ExtResource("2_80tcl")
|
||||
font_size = 32
|
||||
shadow_size = 4
|
||||
shadow_color = Color(0, 0, 0, 1)
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_e3s4u"]
|
||||
font_size = 18
|
||||
|
||||
[node name="MissionObjectives" type="VBoxContainer"]
|
||||
custom_minimum_size = Vector2(256, 0)
|
||||
anchors_preset = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -40.0
|
||||
offset_bottom = 40.0
|
||||
grow_horizontal = 0
|
||||
script = ExtResource("1_pg0np")
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
layout_mode = 2
|
||||
text = "WAKING UP"
|
||||
label_settings = SubResource("LabelSettings_2tk4m")
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="Label2" type="Label" parent="."]
|
||||
layout_mode = 2
|
||||
text = "- RUN!"
|
||||
label_settings = SubResource("LabelSettings_e3s4u")
|
||||
107
scenes/objective_list_item.tscn
Normal file
107
scenes/objective_list_item.tscn
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://dx7buubd8c45c"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://wd3la6kvbm6e" path="res://scripts/objective_list_item.gd" id="1_7qfvb"]
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_a2dn8"]
|
||||
font_size = 18
|
||||
|
||||
[sub_resource type="Animation" id="Animation_a2dn8"]
|
||||
length = 0.001
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:scale:y")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [1.0]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath(".:modulate")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(0, 0, 0, 1)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_7qfvb"]
|
||||
resource_name = "show"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:modulate")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.75),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Color(0, 1, 1, 1), Color(1, 1, 1, 1)]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath(".:scale:y")
|
||||
tracks/1/interp = 2
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.23333335),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [0.0, 1.0]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_v5l3y"]
|
||||
resource_name = "hide"
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath(".:scale:y")
|
||||
tracks/0/interp = 2
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0.8666667, 1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [1.0, 0.0]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath(".:modulate")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Color(0, 1, 0, 1)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_v5l3y"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_a2dn8"),
|
||||
&"hide": SubResource("Animation_v5l3y"),
|
||||
&"show": SubResource("Animation_7qfvb")
|
||||
}
|
||||
|
||||
[node name="ObjectiveListItem" type="Label"]
|
||||
modulate = Color(0, 0, 0, 1)
|
||||
custom_minimum_size = Vector2(256, 0)
|
||||
text = "WAKING UP"
|
||||
label_settings = SubResource("LabelSettings_a2dn8")
|
||||
autowrap_mode = 3
|
||||
script = ExtResource("1_7qfvb")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_v5l3y")
|
||||
}
|
||||
15
scripts/alertness_marker.gd
Normal file
15
scripts/alertness_marker.gd
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
extends Sprite2D
|
||||
|
||||
@export var enemy: Node2D = null
|
||||
|
||||
func _ready() -> void:
|
||||
if !enemy:
|
||||
queue_free()
|
||||
return
|
||||
|
||||
while enemy.reaction_timer > 0:
|
||||
look_at(enemy.global_position)
|
||||
|
||||
#if enemy.get_node("LineOfSight").get_collider().get_name() == "PlayerGround": #modulate =
|
||||
|
||||
queue_free()
|
||||
1
scripts/alertness_marker.gd.uid
Normal file
1
scripts/alertness_marker.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://s7dwusi00l3v
|
||||
|
|
@ -60,6 +60,8 @@ func _interact(player: Node2D) -> void:
|
|||
|
||||
await game.dialogue("Follow me.", "doctor_1", false)
|
||||
|
||||
global.stats.mission_progress = 1
|
||||
|
||||
await navigate_to(game.get_node("DoctorEscapeWaypoint1").position)
|
||||
|
||||
while !game.get_node("DoctorEscapeWaypoint1/Area").get_overlapping_bodies().has(player): await get_tree().create_timer(0.2).timeout
|
||||
|
|
@ -139,6 +141,8 @@ func checkpoint_1():
|
|||
|
||||
await game.dialogue("RUN!", "doctor_1", false)
|
||||
|
||||
global.stats.mission_progress = 2
|
||||
|
||||
while health > 0: await get_tree().create_timer(0.2).timeout
|
||||
|
||||
await game.end_dialogue()
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ func _ready() -> void:
|
|||
func _on_state_1_body_entered(body: Node2D) -> void:
|
||||
if body != game.get_node("PlayerGround"): return
|
||||
|
||||
global.stats.mission_progress = 3
|
||||
|
||||
game.get_node("HospitalEscapeD2State1").monitoring = false
|
||||
|
||||
print("test")
|
||||
|
|
@ -30,6 +32,7 @@ func _on_state_2_body_entered(body: Node2D) -> void:
|
|||
if body != game.get_node("PlayerGround"): return
|
||||
|
||||
game.get_node("HospitalEscapeD2State2").monitoring = false
|
||||
game.get_node("HospitalEscapeD2State2").queue_free()
|
||||
|
||||
firing = true
|
||||
|
||||
|
|
@ -110,6 +113,8 @@ func _on_state_2_body_entered(body: Node2D) -> void:
|
|||
await game.dialogue("I live here. If I left all my stuff behind like this, I would hate myself.", "doctor_2", true)
|
||||
await game.dialogue("That's not something you should worry about excessively, though. You don't even know me.", "doctor_2", true)
|
||||
|
||||
global.stats.story_progress = 3
|
||||
|
||||
game.save_game()
|
||||
|
||||
checkpoint_2()
|
||||
|
|
@ -135,4 +140,8 @@ func checkpoint_2():
|
|||
|
||||
game.get_node("Doctor2DoorToOpen").set_open(true)
|
||||
|
||||
global.stats.story_progress = 3
|
||||
|
||||
|
||||
func _on_state_3_body_entered(body: Node2D) -> void:
|
||||
game.get_node("Doctor2DoorToOpen").set_open(false)
|
||||
|
||||
|
|
|
|||
|
|
@ -100,8 +100,6 @@ func _process(delta: float) -> void:
|
|||
if points.size() > 0:
|
||||
if !current_node: current_node = points[0]
|
||||
|
||||
print(current_node)
|
||||
|
||||
if $Navagent.is_navigation_finished():
|
||||
if points.find(current_node) + 1 > points.size() - 1:
|
||||
current_node = points[0]
|
||||
|
|
@ -115,8 +113,6 @@ func _process(delta: float) -> void:
|
|||
horizontial_movement = axes.x
|
||||
vertical_movement = axes.y
|
||||
|
||||
print(next_position)
|
||||
|
||||
if !$Navagent.target_position or ($Navagent.target_position != current_node.position): $Navagent.target_position = current_node.position
|
||||
|
||||
elif ai_mode == AI_MODE_ATTACK:
|
||||
|
|
|
|||
|
|
@ -83,6 +83,8 @@ func enter_physical(map):
|
|||
|
||||
global.stats.location = map
|
||||
|
||||
global.stats.position = null
|
||||
|
||||
get_tree().change_scene_to_file("res://scenes/ground.tscn")
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ func dialogue(text: String, type: String = "generic", allow_input: bool = true)
|
|||
|
||||
$Dialogue.play()
|
||||
|
||||
await get_tree().create_timer(speed).timeout
|
||||
#await get_tree().create_timer(speed).timeout
|
||||
|
||||
i += 1
|
||||
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ var orbit_zones = [
|
|||
|
||||
]
|
||||
|
||||
var missions = [
|
||||
{
|
||||
var missions = {
|
||||
"waking_up": {
|
||||
"id": "waking_up",
|
||||
"name": "Waking Up",
|
||||
"desc": "Welcome back, spaceperson.",
|
||||
|
|
@ -43,7 +43,7 @@ var missions = [
|
|||
"escape": "Escape to your ship"
|
||||
}
|
||||
},
|
||||
{
|
||||
"test_contract": {
|
||||
"id": "test_contract",
|
||||
"name": "HEMA Removal",
|
||||
"desc": "Space station 02 is currently overrun with HEMA mercenaries. We know they have a bomb in the storage warehouse. We want someone to plant that bomb on the station.",
|
||||
|
|
@ -57,7 +57,7 @@ var missions = [
|
|||
"escape": "Escape"
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
var ground_guns = {
|
||||
"pistol": {
|
||||
|
|
@ -164,7 +164,7 @@ var default_stats = {
|
|||
"equipped_ground_gun": null,
|
||||
"gun_holstered": true,
|
||||
|
||||
"active_mission": "waking_up",
|
||||
"active_mission": null,
|
||||
"mission_progress": 0,
|
||||
"completed_missions": [],
|
||||
}
|
||||
|
|
|
|||
25
scripts/mission_objectives.gd
Normal file
25
scripts/mission_objectives.gd
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
extends VBoxContainer
|
||||
|
||||
var last_mission_progres = -1
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if global.stats.active_mission:
|
||||
visible = true
|
||||
|
||||
var mission = global.missions[global.stats.active_mission]
|
||||
|
||||
if last_mission_progres != global.stats.mission_progress:
|
||||
last_mission_progres = global.stats.mission_progress
|
||||
|
||||
|
||||
if mission.objectives.values().size() - 1 < global.stats.mission_progress:
|
||||
global.stats.completed_missions.push_front(global.stats.active_mission)
|
||||
global.stats.mission_progress = 0
|
||||
global.stats.active_mission = null
|
||||
|
||||
return
|
||||
|
||||
$Label.text = mission.name
|
||||
$Label2.text = "- " + mission.objectives.values()[global.stats.mission_progress]
|
||||
else:
|
||||
visible = false
|
||||
1
scripts/mission_objectives.gd.uid
Normal file
1
scripts/mission_objectives.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://ceua7bjh8xokf
|
||||
|
|
@ -3,5 +3,7 @@ extends Sprite2D
|
|||
@export var destination: Node2D = null
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if !destination: return
|
||||
|
||||
look_at(destination.global_position)
|
||||
rotation += deg_to_rad(90)
|
||||
|
|
|
|||
19
scripts/objective_list_item.gd
Normal file
19
scripts/objective_list_item.gd
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
extends Label
|
||||
|
||||
var progress = 1
|
||||
var hiding = false
|
||||
|
||||
func _ready() -> void:
|
||||
$AnimationPlayer.play("show")
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if hiding: return
|
||||
|
||||
if global.stats.mission_progress >= progress:
|
||||
hiding = true
|
||||
|
||||
$AnimationPlayer.play("hide")
|
||||
|
||||
await $AnimationPlayer.animation_finished
|
||||
|
||||
queue_free()
|
||||
1
scripts/objective_list_item.gd.uid
Normal file
1
scripts/objective_list_item.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://wd3la6kvbm6e
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
extends "res://scripts/character_ground.gd"
|
||||
|
||||
var last_aim_direction = Vector2(0, 0)
|
||||
var processing_death = false
|
||||
|
||||
func _ready() -> void:
|
||||
super()
|
||||
|
|
@ -14,9 +15,16 @@ func _process(delta: float) -> void:
|
|||
super(delta)
|
||||
|
||||
if dead:
|
||||
if processing_death: return
|
||||
|
||||
processing_death = true
|
||||
|
||||
await get_tree().create_timer(1).timeout
|
||||
|
||||
if global.checkpoint:
|
||||
global.load_game()
|
||||
get_tree().change_scene_to_file("res://scenes/ground.tscn")
|
||||
return
|
||||
|
||||
if input_icon.using_gamepad:
|
||||
if !((Input.get_axis("aim_left", "aim_right") == 0) and (Input.get_axis("aim_up", "aim_down") == 0)):
|
||||
|
|
|
|||
|
|
@ -196,6 +196,10 @@ func _ground_ready() -> void:
|
|||
|
||||
player.busy = false
|
||||
|
||||
global.stats.active_mission = "waking_up"
|
||||
|
||||
game.get_node("UI/Control/MoveTutorial").visible = true
|
||||
|
||||
while i < 100:
|
||||
await get_tree().create_timer(0.2).timeout
|
||||
|
||||
|
|
@ -203,20 +207,15 @@ func _ground_ready() -> void:
|
|||
|
||||
i += 2
|
||||
|
||||
game.get_node("UI/Control/MoveTutorial").visible = true
|
||||
|
||||
while player.velocity.length() == 0:
|
||||
await get_tree().create_timer(0.1).timeout
|
||||
|
||||
await get_tree().create_timer(1).timeout
|
||||
|
||||
print("end")
|
||||
|
||||
game.get_node("UI/Control/MoveTutorial").visible = false
|
||||
|
||||
elif global.stats.story_progress == 1:
|
||||
pass
|
||||
elif global.stats.story_progress == 2:
|
||||
print("PROGRESS 2")
|
||||
game.get_node("Uglyburger").stop()
|
||||
|
||||
game.get_node("IntrusionAlarm").play()
|
||||
|
|
@ -230,6 +229,7 @@ func _ground_ready() -> void:
|
|||
|
||||
game.get_node("Doctor").checkpoint_1()
|
||||
elif global.stats.story_progress == 3:
|
||||
print("PROGRESS 3")
|
||||
game.get_node("Uglyburger").stop()
|
||||
|
||||
game.get_node("HospitalEscapeD2State1").monitoring = false
|
||||
|
|
@ -237,6 +237,8 @@ func _ground_ready() -> void:
|
|||
|
||||
game.get_node("Map").modulate = Color(0.5, 0.35, 0.35)
|
||||
|
||||
game.get_node("Doctor").queue_free()
|
||||
|
||||
game.get_node("Doctor2").global_position = game.get_node("Doctor2DoorWaypoint").global_position
|
||||
|
||||
game.get_node("Doctor2").firing = false
|
||||
|
|
|
|||
BIN
sounds/yay.mp3
Normal file
BIN
sounds/yay.mp3
Normal file
Binary file not shown.
19
sounds/yay.mp3.import
Normal file
19
sounds/yay.mp3.import
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://b5tvttwjwgpb1"
|
||||
path="res://.godot/imported/yay.mp3-25ed624d349ce4768f62d6fb0b734c96.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sounds/yay.mp3"
|
||||
dest_files=["res://.godot/imported/yay.mp3-25ed624d349ce4768f62d6fb0b734c96.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
Loading…
Reference in a new issue