improved loading screen and worked on code
This commit is contained in:
parent
5a2df93eb4
commit
09af71289f
9 changed files with 106 additions and 32 deletions
|
@ -2797,7 +2797,7 @@ 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="MarginContainer" type="MarginContainer" parent="."]
|
||||
[node name="HUD" type="MarginContainer" parent="."]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
@ -2808,18 +2808,18 @@ 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"]
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="HUD"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/HBoxContainer"]
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="HUD/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label_Station" type="Label" parent="MarginContainer/HBoxContainer/VBoxContainer"]
|
||||
[node name="Label_Station" type="Label" parent="HUD/HBoxContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "FEHLER BEIM LADEN"
|
||||
label_settings = SubResource("LabelSettings_qbfpe")
|
||||
|
||||
[node name="Label_Controls" type="Label" parent="MarginContainer/HBoxContainer/VBoxContainer"]
|
||||
[node name="Label_Controls" type="Label" parent="HUD/HBoxContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 1
|
||||
text = "esc - pause
|
||||
|
@ -2827,31 +2827,22 @@ 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="MarginContainer/HBoxContainer/VBoxContainer"]
|
||||
[node name="Label_Controls2" type="Label" parent="HUD/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="HBoxContainer2" type="HBoxContainer" parent="MarginContainer"]
|
||||
[node name="HBoxContainer2" type="HBoxContainer" parent="HUD"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label_Health" type="Label" parent="MarginContainer/HBoxContainer2"]
|
||||
[node name="Label_Health" type="Label" parent="HUD/HBoxContainer2"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 8
|
||||
text = "[||||||||||]"
|
||||
label_settings = SubResource("LabelSettings_2uy0w")
|
||||
vertical_alignment = 2
|
||||
|
||||
[node name="Label_Controls3" type="Label" parent="."]
|
||||
visible = false
|
||||
offset_left = 100.0
|
||||
offset_top = 318.0
|
||||
offset_right = 625.0
|
||||
offset_bottom = 346.0
|
||||
text = "coordinates"
|
||||
label_settings = SubResource("LabelSettings_27422")
|
||||
|
||||
[node name="PauseMenu" parent="." instance=ExtResource("3_i8tni")]
|
||||
visible = false
|
||||
|
||||
|
|
BIN
loading-screen-transparent.png
Normal file
BIN
loading-screen-transparent.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 98 KiB |
34
loading-screen-transparent.png.import
Normal file
34
loading-screen-transparent.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://doatkgfq3rm5i"
|
||||
path="res://.godot/imported/loading-screen-transparent.png-54b9add142b7ac10ba022b681513b038.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://loading-screen-transparent.png"
|
||||
dest_files=["res://.godot/imported/loading-screen-transparent.png-54b9add142b7ac10ba022b681513b038.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
BIN
loading-screen.png
Normal file
BIN
loading-screen.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 81 KiB |
34
loading-screen.png.import
Normal file
34
loading-screen.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://y6nrywfnsq4c"
|
||||
path="res://.godot/imported/loading-screen.png-b93c9f42a3d258918f0b7542b0d2f4dd.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://loading-screen.png"
|
||||
dest_files=["res://.godot/imported/loading-screen.png-b93c9f42a3d258918f0b7542b0d2f4dd.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
22
main.gd
22
main.gd
|
@ -1,20 +1,21 @@
|
|||
# Do not change those values
|
||||
extends Node3D
|
||||
@onready var pause_menu = $PauseMenu
|
||||
|
||||
var paused = false
|
||||
#var showpaused = false
|
||||
@onready var pause_menu = $PauseMenu
|
||||
var checkpoint = checkpoint0
|
||||
@onready var healthtext = $HUD/HBoxContainer2/Label_Health
|
||||
@onready var checkpointtext = $HUD/HBoxContainer/VBoxContainer/Label_Station
|
||||
@onready var player = get_node("Player")
|
||||
var time_accum = 0.0 # Timer accumulator
|
||||
var elapsed_time := 0.0
|
||||
var restart_count = 0
|
||||
|
||||
var checkpoint0 = Vector3(0, 2, 1.374)
|
||||
var checkpoint1 = Vector3(-27.5, 13, 12.5)
|
||||
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 = $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")
|
||||
|
@ -47,10 +48,11 @@ func _process(delta: float):
|
|||
Engine.time_scale = 1
|
||||
player.audioplayer.stream = load("res://assets/audio/Revive.wav")
|
||||
player.audioplayer.play()
|
||||
restart_count = restart_count + 1
|
||||
elif Input.is_action_just_pressed("proluz_ui_reset"):
|
||||
get_tree().reload_current_scene()
|
||||
var player = get_node("Player")
|
||||
$MarginContainer/HBoxContainer/VBoxContainer/Label_Controls2.text = get_formatted_time()
|
||||
$HUD/HBoxContainer/VBoxContainer/Label_Controls2.text = get_formatted_time()
|
||||
# Health bar
|
||||
if player.health == 100:
|
||||
healthtext.text = "[//////////]"
|
||||
|
|
|
@ -16,7 +16,8 @@ config/name_localized={
|
|||
}
|
||||
run/main_scene="res://start.tscn"
|
||||
config/features=PackedStringArray("4.4", "Forward Plus")
|
||||
boot_splash/image="uid://0hcyy1njk5tu"
|
||||
boot_splash/bg_color=Color(0.14902, 0, 0.258824, 1)
|
||||
boot_splash/image="uid://doatkgfq3rm5i"
|
||||
config/icon="uid://fad7xr2jj2nu"
|
||||
|
||||
[autoload]
|
||||
|
|
8
start.gd
8
start.gd
|
@ -1,4 +1,12 @@
|
|||
extends Control
|
||||
|
||||
@onready var start_button = get_node("TextureRect/MarginContainer/HBoxContainer/VBoxContainer/PlayButton")
|
||||
|
||||
func main():
|
||||
print("Hey!")
|
||||
|
||||
func _start_button_pressed():
|
||||
get_tree().change_scene_to_file("res://Level_Core.tscn")
|
||||
|
||||
func _ready():
|
||||
start_button.pressed.connect(_start_button_pressed)
|
||||
|
|
12
start.tscn
12
start.tscn
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=12 format=3 uid="uid://bciy4rskxlowb"]
|
||||
[gd_scene load_steps=13 format=3 uid="uid://bciy4rskxlowb"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://t2iw8p1c6rq3" path="res://start.gd" id="1_g38d0"]
|
||||
[ext_resource type="Texture2D" uid="uid://b2mj17i87nwec" path="res://proluzbg.png" id="2_g38d0"]
|
||||
|
@ -7,6 +7,7 @@
|
|||
[ext_resource type="FontFile" uid="uid://rswq6vrwr2nx" path="res://InstrumentSans-VariableFont_wdth,wght.ttf" id="5_da165"]
|
||||
[ext_resource type="Script" uid="uid://cax1b0y8uvwj3" path="res://button_2.gd" id="6_r8ukj"]
|
||||
[ext_resource type="Script" uid="uid://dti3q3vy3rysn" path="res://quit_button.gd" id="7_1colc"]
|
||||
[ext_resource type="Texture2D" uid="uid://fad7xr2jj2nu" path="res://ProjektLuzidLogo.svg" id="8_pob1m"]
|
||||
|
||||
[sub_resource type="FontFile" id="FontFile_db7xr"]
|
||||
cache/0/16/0/ascent = 0.0
|
||||
|
@ -203,11 +204,14 @@ label_settings = SubResource("LabelSettings_ep3pr")
|
|||
horizontal_alignment = 2
|
||||
|
||||
[node name="Button2" type="Button" parent="TextureRect/MarginContainer/HBoxContainer/VBoxContainer2"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
text = "text"
|
||||
text = "Tutorial
|
||||
Layer: Core"
|
||||
icon = ExtResource("8_pob1m")
|
||||
alignment = 0
|
||||
icon_alignment = 2
|
||||
expand_icon = true
|
||||
|
||||
[node name="Button" type="Button" parent="TextureRect/MarginContainer/HBoxContainer/VBoxContainer2"]
|
||||
visible = false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue