diff --git a/.gitignore b/.gitignore index c3092eb..5a5da54 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .godot/ /android/ /.DS_Store +jennie-docs \ No newline at end of file diff --git a/hud.tscn b/hud.tscn new file mode 100644 index 0000000..414f43e --- /dev/null +++ b/hud.tscn @@ -0,0 +1,97 @@ +[gd_scene format=3 uid="uid://dt0vbt6xgms6m"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_n2snw"] +bg_color = Color(0.039215688, 0.16470589, 0.039215688, 1) +corner_radius_top_left = 4 +corner_radius_top_right = 4 +corner_radius_bottom_right = 4 +corner_radius_bottom_left = 4 + +[node name="HUD" type="Control" unique_id=1519812318] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="StatsMargin" type="MarginContainer" parent="." unique_id=428486326] +layout_mode = 0 +offset_right = 40.0 +offset_bottom = 40.0 +theme_override_constants/margin_left = 20 +theme_override_constants/margin_top = 20 + +[node name="StatsColumn" type="VBoxContainer" parent="StatsMargin" unique_id=365054136] +layout_mode = 2 + +[node name="PeopleLabel" type="Label" parent="StatsMargin/StatsColumn" unique_id=203661849] +layout_mode = 2 +theme_override_font_sizes/font_size = 24 +text = "PEOPLE: 0" + +[node name="SavedLabel" type="Label" parent="StatsMargin/StatsColumn" unique_id=830917509] +layout_mode = 2 +theme_override_font_sizes/font_size = 24 +text = "SAVED: 0" + +[node name="FloorLabel" type="Label" parent="StatsMargin/StatsColumn" unique_id=320822205] +layout_mode = 2 +theme_override_font_sizes/font_size = 24 +text = "FLOOR: 0" + +[node name="ElevatorPanel" type="PanelContainer" parent="." unique_id=528786554] +custom_minimum_size = Vector2(250, 0) +layout_mode = 1 +anchors_preset = 11 +anchor_left = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -8.0 +grow_horizontal = 0 +grow_vertical = 2 + +[node name="PanelMargin" type="MarginContainer" parent="ElevatorPanel" unique_id=277992523] +layout_mode = 2 +theme_override_constants/margin_left = 15 +theme_override_constants/margin_top = 15 +theme_override_constants/margin_right = 15 +theme_override_constants/margin_bottom = 15 + +[node name="PanelColumn" type="VBoxContainer" parent="ElevatorPanel/PanelMargin" unique_id=617812367] +layout_mode = 2 + +[node name="Screen" type="Panel" parent="ElevatorPanel/PanelMargin/PanelColumn" unique_id=1525784323] +custom_minimum_size = Vector2(200, 200) +layout_mode = 2 +theme_override_styles/panel = SubResource("StyleBoxFlat_n2snw") + +[node name="TargetZone" type="ColorRect" parent="ElevatorPanel/PanelMargin/PanelColumn/Screen" unique_id=1945539908] +custom_minimum_size = Vector2(40, 160) +layout_mode = 0 +offset_left = 88.0 +offset_top = 18.0 +offset_right = 128.0 +offset_bottom = 178.0 +color = Color(0.101960786, 0.3529412, 0.101960786, 1) + +[node name="SweepLine" type="ColorRect" parent="ElevatorPanel/PanelMargin/PanelColumn/Screen" unique_id=1798423613] +custom_minimum_size = Vector2(4, 160) +layout_mode = 0 +offset_right = 40.0 +offset_bottom = 40.0 +color = Color(1, 0, 0, 1) + +[node name="AIFace" type="Label" parent="ElevatorPanel/PanelMargin/PanelColumn/Screen" unique_id=1410806030] +layout_mode = 0 +offset_right = 40.0 +offset_bottom = 23.0 +theme_override_colors/font_color = Color(0.2, 1, 0.2, 1) +theme_override_font_sizes/font_size = 32 +text = ">:)" + +[node name="CloseButton" type="Button" parent="ElevatorPanel/PanelMargin/PanelColumn" unique_id=427545014] +custom_minimum_size = Vector2(0, 60) +layout_mode = 2 +theme_override_font_sizes/font_size = 28 +text = "CLOSE" diff --git a/scenes/component_spawn.gd b/scenes/component_spawn.gd index cf8723c..b887d7d 100644 --- a/scenes/component_spawn.gd +++ b/scenes/component_spawn.gd @@ -12,16 +12,11 @@ var spawn_readiness: bool = false @onready var start_pos = survivor_spawn.global_position func _ready() -> void: - spawn_readiness = false - -func _physics_process(delta): - if spawn_readiness == true: - spawn_survivor() - spawn_readiness = false + start() - else: func start() -> void: spawn_readiness = true + spawn_survivor() #func _physics_process(delta): #if spawn_readiness == true: @@ -37,7 +32,7 @@ func spawn_survivor(): else: var survivor_delay: float = randf_range(1, 2.5) - + var start_variance = Vector3((randf_range(-1, 2)),0,0) for x in range(survivors): var s = survivor.instantiate()