FERTIG!!!
This commit is contained in:
parent
1ae6aad011
commit
5a2df93eb4
5 changed files with 72 additions and 57 deletions
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=33 format=3 uid="uid://bn20cqfwvm2oe"]
|
||||
[gd_scene load_steps=35 format=3 uid="uid://bn20cqfwvm2oe"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bpj62lqejp32d" path="res://main.gd" id="1_fwt2i"]
|
||||
[ext_resource type="PackedScene" uid="uid://bs6yq6gy7k2sb" path="res://player.tscn" id="1_lsi31"]
|
||||
|
@ -68,6 +68,10 @@ albedo_texture = ExtResource("2_gp22r")
|
|||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_7rthl"]
|
||||
albedo_texture = ExtResource("5_r3eyv")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ldd5v"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_boye7"]
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_qbfpe"]
|
||||
font = ExtResource("10_o66vw")
|
||||
font_size = 75
|
||||
|
@ -2570,6 +2574,7 @@ shape = ExtResource("2_7sds5")
|
|||
transform = Transform3D(-3.27835e-08, -1, 8.74228e-08, 0, -4.37114e-08, -2, 0.75, -4.37114e-08, 3.82137e-15, -26.6318, -9.40376, 8.93275)
|
||||
mesh = SubResource("PlaneMesh_rv2mx")
|
||||
skeleton = NodePath("../MeshInstance3D")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_ldd5v")
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D113"]
|
||||
|
||||
|
@ -2580,6 +2585,7 @@ shape = ExtResource("2_7sds5")
|
|||
transform = Transform3D(-3.27835e-08, -1, 8.74228e-08, 0, -4.37114e-08, -2, 0.75, -4.37114e-08, 3.82137e-15, -35.2546, -9.40376, 9.61097)
|
||||
mesh = SubResource("PlaneMesh_rv2mx")
|
||||
skeleton = NodePath("../MeshInstance3D")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_boye7")
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D200"]
|
||||
|
||||
|
@ -2590,6 +2596,7 @@ shape = ExtResource("2_7sds5")
|
|||
transform = Transform3D(-3.27835e-08, -1, 8.74228e-08, 0, -4.37114e-08, -2, 0.75, -4.37114e-08, 3.82137e-15, -21.4139, -9.40376, 13.4966)
|
||||
mesh = SubResource("PlaneMesh_rv2mx")
|
||||
skeleton = NodePath("../MeshInstance3D")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_ldd5v")
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="MeshInstance3D201"]
|
||||
|
||||
|
@ -2790,41 +2797,48 @@ outline_modulate = Color(0.00803253, 9.36218e-06, 0.0382829, 1)
|
|||
text = "To unlock/free the cursor, press Shift+Enter"
|
||||
font = ExtResource("2_fq2vn")
|
||||
|
||||
[node name="Label_Station" type="Label" parent="."]
|
||||
offset_left = 100.0
|
||||
offset_top = 100.0
|
||||
offset_right = 490.0
|
||||
offset_bottom = 199.0
|
||||
text = "DEMO-Version"
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/margin_left = 50
|
||||
theme_override_constants/margin_top = 50
|
||||
theme_override_constants/margin_right = 50
|
||||
theme_override_constants/margin_bottom = 50
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label_Station" type="Label" parent="MarginContainer/HBoxContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "FEHLER BEIM LADEN"
|
||||
label_settings = SubResource("LabelSettings_qbfpe")
|
||||
|
||||
[node name="Label_Controls" type="Label" parent="."]
|
||||
offset_left = 100.0
|
||||
offset_top = 200.0
|
||||
offset_right = 625.0
|
||||
offset_bottom = 290.0
|
||||
[node name="Label_Controls" type="Label" parent="MarginContainer/HBoxContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 1
|
||||
text = "esc - pause
|
||||
shift+r - back to checkpoint/Zurück zum Checkpoint
|
||||
f5 - restart level/Level neu starten"
|
||||
label_settings = SubResource("LabelSettings_27422")
|
||||
|
||||
[node name="Label_Controls2" type="Label" parent="."]
|
||||
offset_left = 100.0
|
||||
offset_top = 290.0
|
||||
offset_right = 625.0
|
||||
offset_bottom = 318.0
|
||||
text = "time/zeit: "
|
||||
[node name="Label_Controls2" type="Label" parent="MarginContainer/HBoxContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Wenn du dies siehst, wurde das Code nicht richtig geladen.
|
||||
Versuche, das Spiel neu zu starten."
|
||||
label_settings = SubResource("LabelSettings_27422")
|
||||
|
||||
[node name="Label_Health" type="Label" parent="."]
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 100.0
|
||||
offset_top = -100.0
|
||||
offset_right = 625.0
|
||||
offset_bottom = -72.0
|
||||
grow_vertical = 0
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label_Health" type="Label" parent="MarginContainer/HBoxContainer2"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 8
|
||||
text = "[||||||||||]"
|
||||
label_settings = SubResource("LabelSettings_2uy0w")
|
||||
vertical_alignment = 2
|
||||
|
|
|
@ -51,7 +51,7 @@ custom_features=""
|
|||
export_filter="all_resources"
|
||||
include_filter=""
|
||||
exclude_filter=""
|
||||
export_path="Exports/Windows/ProjektLuzid.exe"
|
||||
export_path="Exports/Windows/AbgabeterminPU/ProjektLuzid.exe"
|
||||
patches=PackedStringArray()
|
||||
encryption_include_filters=""
|
||||
encryption_exclude_filters=""
|
||||
|
|
55
main.gd
55
main.gd
|
@ -9,15 +9,16 @@ var checkpoint2 = Vector3(0, 22, 1.374)
|
|||
var checkpoint3 = Vector3(-50, 25, -5)
|
||||
var terminus = Vector3(-8, -8.5, 9.5)
|
||||
var checkpoint = checkpoint0
|
||||
@onready var checkpointtext = $Label_Station
|
||||
@onready var checkpointtext = $MarginContainer/HBoxContainer/VBoxContainer/Label_Station
|
||||
var time_accum = 0.0 # Timer accumulator
|
||||
@onready var player = get_node("Player")
|
||||
var elapsed_time := 0.0
|
||||
var restart_count = 0
|
||||
@onready var healthtext = $MarginContainer/HBoxContainer2/Label_Health
|
||||
|
||||
func _ready() -> void:
|
||||
var player = get_node("Player")
|
||||
$Label_Station.text = "station 0"
|
||||
checkpointtext.text = "station 0"
|
||||
# while true:
|
||||
# wait(5)
|
||||
# print(player.checkpoint)
|
||||
|
@ -49,44 +50,44 @@ func _process(delta: float):
|
|||
elif Input.is_action_just_pressed("proluz_ui_reset"):
|
||||
get_tree().reload_current_scene()
|
||||
var player = get_node("Player")
|
||||
$Label_Controls2.text = get_formatted_time()
|
||||
$MarginContainer/HBoxContainer/VBoxContainer/Label_Controls2.text = get_formatted_time()
|
||||
# Health bar
|
||||
if player.health == 100:
|
||||
$Label_Health.text = "[//////////]"
|
||||
$Label_Health.add_theme_color_override("font_color", Color.GREEN)
|
||||
healthtext.text = "[//////////]"
|
||||
healthtext.add_theme_color_override("font_color", Color.GREEN)
|
||||
elif player.health >= 90:
|
||||
$Label_Health.text = "[/////////·]"
|
||||
$Label_Health.add_theme_color_override("font_color", Color.GREEN)
|
||||
healthtext.text = "[/////////·]"
|
||||
healthtext.add_theme_color_override("font_color", Color.GREEN)
|
||||
elif player.health >= 80:
|
||||
$Label_Health.text = "[////////··]"
|
||||
$Label_Health.add_theme_color_override("font_color", Color.GREEN)
|
||||
healthtext.text = "[////////··]"
|
||||
healthtext.add_theme_color_override("font_color", Color.GREEN)
|
||||
elif player.health >= 70:
|
||||
$Label_Health.text = "[///////···]"
|
||||
$Label_Health.add_theme_color_override("font_color", Color.GREEN)
|
||||
healthtext.text = "[///////···]"
|
||||
healthtext.add_theme_color_override("font_color", Color.GREEN)
|
||||
elif player.health >= 60:
|
||||
$Label_Health.text = "[//////····]"
|
||||
$Label_Health.add_theme_color_override("font_color", Color.GREEN_YELLOW)
|
||||
healthtext.text = "[//////····]"
|
||||
healthtext.add_theme_color_override("font_color", Color.GREEN_YELLOW)
|
||||
elif player.health >= 50:
|
||||
$Label_Health.text = "[/////·····]"
|
||||
$Label_Health.add_theme_color_override("font_color", Color.GREEN_YELLOW)
|
||||
healthtext.text = "[/////·····]"
|
||||
healthtext.add_theme_color_override("font_color", Color.GREEN_YELLOW)
|
||||
elif player.health >= 40:
|
||||
$Label_Health.text = "[////······]"
|
||||
$Label_Health.add_theme_color_override("font_color", Color.YELLOW)
|
||||
healthtext.text = "[////······]"
|
||||
healthtext.add_theme_color_override("font_color", Color.YELLOW)
|
||||
elif player.health >= 30:
|
||||
$Label_Health.text = "[///·······]"
|
||||
$Label_Health.add_theme_color_override("font_color", Color.YELLOW)
|
||||
healthtext.text = "[///·······]"
|
||||
healthtext.add_theme_color_override("font_color", Color.YELLOW)
|
||||
elif player.health >= 20:
|
||||
$Label_Health.text = "[//········]"
|
||||
$Label_Health.add_theme_color_override("font_color", Color.YELLOW)
|
||||
healthtext.text = "[//········]"
|
||||
healthtext.add_theme_color_override("font_color", Color.YELLOW)
|
||||
elif player.health >= 10:
|
||||
$Label_Health.text = "[/·········]"
|
||||
$Label_Health.add_theme_color_override("font_color", Color.INDIAN_RED)
|
||||
healthtext.text = "[/·········]"
|
||||
healthtext.add_theme_color_override("font_color", Color.INDIAN_RED)
|
||||
elif player.health >= 1:
|
||||
$Label_Health.text = "[|·········][CRITICAL]"
|
||||
$Label_Health.add_theme_color_override("font_color", Color.RED)
|
||||
healthtext.text = "[|·········][CRITICAL]"
|
||||
healthtext.add_theme_color_override("font_color", Color.RED)
|
||||
elif player.health == 0:
|
||||
$Label_Health.text = "[··········][DEAD/Shift+R to revive]"
|
||||
$Label_Health.add_theme_color_override("font_color", Color.MEDIUM_PURPLE)
|
||||
healthtext.text = "[··········][DEAD/Shift+R to revive]"
|
||||
healthtext.add_theme_color_override("font_color", Color.MEDIUM_PURPLE)
|
||||
Engine.time_scale = 0.001
|
||||
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ func _ready() -> void:
|
|||
|
||||
var touched = false
|
||||
|
||||
var health = 0
|
||||
var health = 100
|
||||
|
||||
func teleport_to_checkpoint():
|
||||
levelcore = get_node("/root/LevelCore")
|
||||
|
|
|
@ -25,7 +25,7 @@ DiscordRPCLoader="*res://addons/discord-rpc-gd/nodes/discord_autoload.gd"
|
|||
|
||||
[display]
|
||||
|
||||
window/stretch/mode="viewport"
|
||||
window/stretch/mode="canvas_items"
|
||||
window/stretch/aspect="expand"
|
||||
|
||||
[editor_plugins]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue