Merge remote-tracking branch 'origin/main' into Albionium

This commit is contained in:
Albion
2022-12-11 01:29:12 +01:00
17 changed files with 249 additions and 11 deletions

BIN
.zip Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cj5tvg0uksgif"
path="res://.godot/imported/Speedometer_background.png-36e6b41abb1bb4cff0fa57f4cd212590.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Textures/GUI/Speedometer_background.png"
dest_files=["res://.godot/imported/Speedometer_background.png-36e6b41abb1bb4cff0fa57f4cd212590.ctex"]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c8087dusjhilc"
path="res://.godot/imported/Speedometer_foreground.png-e9753c34156799290374c579413237fa.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Textures/GUI/Speedometer_foreground.png"
dest_files=["res://.godot/imported/Speedometer_foreground.png-e9753c34156799290374c579413237fa.ctex"]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://hy1r4mahhob2"
path="res://.godot/imported/Speedometer_pointer.png-78b22e60c608fc9d8b347b899fac4f96.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Textures/GUI/Speedometer_pointer.png"
dest_files=["res://.godot/imported/Speedometer_pointer.png-78b22e60c608fc9d8b347b899fac4f96.ctex"]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c62xglrjom4sn"
path="res://.godot/imported/frame_player1.png-3a9ba716dcebf31c0b02a838e38392eb.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Textures/GUI/frame_player1.png"
dest_files=["res://.godot/imported/frame_player1.png-3a9ba716dcebf31c0b02a838e38392eb.ctex"]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
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

View File

@@ -18,6 +18,8 @@ transform = Transform3D(1.57581, 0, 0, 0, 2.16936, 0, 0, 0, 1.5749, 0, 0, 0)
shape = SubResource("CylinderShape3D_h8ivv") shape = SubResource("CylinderShape3D_h8ivv")
[node name="HitBox" type="Area3D" parent="."] [node name="HitBox" type="Area3D" parent="."]
collision_layer = 3
collision_mask = 3
[node name="CollisionShape3D" type="CollisionShape3D" parent="HitBox"] [node name="CollisionShape3D" type="CollisionShape3D" parent="HitBox"]
transform = Transform3D(2.74062, 0, 0, 0, 2.24144, 0, 0, 0, 2.70992, 0, 0, 0) transform = Transform3D(2.74062, 0, 0, 0, 2.24144, 0, 0, 0, 2.70992, 0, 0, 0)

View File

@@ -155,7 +155,7 @@ transform = Transform3D(-6.55671e-08, 0, 1.5, 0, 1.5, 0, -1.5, 0, -6.55671e-08,
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0.70291, -0.287106, 10.1948) transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0.70291, -0.287106, 10.1948)
[node name="Storage3" parent="." instance=ExtResource("4_5jw5g")] [node name="Storage3" parent="." instance=ExtResource("4_5jw5g")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.63306, -0.501894, -11.5457) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.63306, -0.159192, -10.7834)
currentType = 1 currentType = 1
icon = ExtResource("19_5df2b") icon = ExtResource("19_5df2b")
audioClip = ExtResource("17_ajifv") audioClip = ExtResource("17_ajifv")
@@ -165,6 +165,7 @@ transform = Transform3D(-6.55671e-08, 0, 1.5, 0, 1.5, 0, -1.5, 0, -6.55671e-08,
[node name="StaticBody3D2" type="StaticBody3D" parent="train"] [node name="StaticBody3D2" type="StaticBody3D" parent="train"]
transform = Transform3D(-2.91409e-08, 0, -0.666667, 0, 0.666667, 0, 0.666667, 0, -2.91409e-08, 6, -0.137826, -1.33333) transform = Transform3D(-2.91409e-08, 0, -0.666667, 0, 0.666667, 0, 0.666667, 0, -2.91409e-08, 6, -0.137826, -1.33333)
collision_layer = 2
[node name="CollisionShape3D2" type="CollisionShape3D" parent="train/StaticBody3D2"] [node name="CollisionShape3D2" type="CollisionShape3D" parent="train/StaticBody3D2"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.5, 2, 4.23516e-22) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.5, 2, 4.23516e-22)

View File

@@ -87,6 +87,7 @@ transform = Transform3D(1.96701e-07, 0, -1.5, 0, 1.5, 0, 1.5, 0, 1.96701e-07, -3
[node name="StaticBody3D2" type="StaticBody3D" parent="train"] [node name="StaticBody3D2" type="StaticBody3D" parent="train"]
transform = Transform3D(-2.91409e-08, 0, -0.666667, 0, 0.666667, 0, 0.666667, 0, -2.91409e-08, 6, -0.137826, -1.33333) transform = Transform3D(-2.91409e-08, 0, -0.666667, 0, 0.666667, 0, 0.666667, 0, -2.91409e-08, 6, -0.137826, -1.33333)
collision_layer = 2
[node name="CollisionShape3D2" type="CollisionShape3D" parent="train/StaticBody3D2"] [node name="CollisionShape3D2" type="CollisionShape3D" parent="train/StaticBody3D2"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.5, 2, 4.23516e-22) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.5, 2, 4.23516e-22)

View File

@@ -1,10 +1,9 @@
[gd_scene load_steps=11 format=3 uid="uid://b8u4bo4mklj55"] [gd_scene load_steps=10 format=3 uid="uid://b8u4bo4mklj55"]
[ext_resource type="Script" path="res://scripts/Logic/Game.gd" id="1_dubwq"] [ext_resource type="Script" path="res://scripts/Logic/Game.gd" id="1_dubwq"]
[ext_resource type="PackedScene" uid="uid://nxapkgcq2c70" path="res://Nodes/light_setup.tscn" id="2_1lh4t"] [ext_resource type="PackedScene" path="res://Nodes/light_setup.tscn" id="2_1lh4t"]
[ext_resource type="PackedScene" uid="uid://bqe8ucbruto1j" path="res://Nodes/StartNode.tscn" id="3_xcgy2"] [ext_resource type="PackedScene" uid="uid://bqe8ucbruto1j" path="res://Nodes/StartNode.tscn" id="3_xcgy2"]
[ext_resource type="PackedScene" uid="uid://md2ofbviios3" path="res://Nodes/Train_P1.tscn" id="4_gg4ea"] [ext_resource type="PackedScene" uid="uid://md2ofbviios3" path="res://Nodes/Train_P1.tscn" id="4_gg4ea"]
[ext_resource type="PackedScene" uid="uid://bw3yluhr72n2t" path="res://Nodes/InfiniteScroller.tscn" id="5_3jhcw"]
[ext_resource type="PackedScene" uid="uid://bikdn7ep2vpxw" path="res://Nodes/Train_P2.tscn" id="5_wi6pu"] [ext_resource type="PackedScene" uid="uid://bikdn7ep2vpxw" path="res://Nodes/Train_P2.tscn" id="5_wi6pu"]
[ext_resource type="PackedScene" uid="uid://cys06pnxfjl2m" path="res://Nodes/UI.tscn" id="6_eicse"] [ext_resource type="PackedScene" uid="uid://cys06pnxfjl2m" path="res://Nodes/UI.tscn" id="6_eicse"]
[ext_resource type="AudioStream" uid="uid://c5jhukuk8r3mf" path="res://Assets/Sounds/_MUSIC_/GameJamGameLoop.wav" id="7_wagg2"] [ext_resource type="AudioStream" uid="uid://c5jhukuk8r3mf" path="res://Assets/Sounds/_MUSIC_/GameJamGameLoop.wav" id="7_wagg2"]
@@ -28,15 +27,9 @@ near = 0.041
[node name="Train1" parent="." instance=ExtResource("4_gg4ea")] [node name="Train1" parent="." instance=ExtResource("4_gg4ea")]
transform = Transform3D(1, 0, 3.55271e-15, 0, 1, 0, -3.55271e-15, 0, 1, -10, 0, 0) transform = Transform3D(1, 0, 3.55271e-15, 0, 1, 0, -3.55271e-15, 0, 1, -10, 0, 0)
[node name="InfiniteScroller" parent="Train1" instance=ExtResource("5_3jhcw")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -5, -104)
[node name="Train2" parent="." instance=ExtResource("5_wi6pu")] [node name="Train2" parent="." instance=ExtResource("5_wi6pu")]
transform = Transform3D(1, 0, 3.55271e-15, 0, 1, 0, -3.55271e-15, 0, 1, 9.90113, -0.0549407, -0.085681) transform = Transform3D(1, 0, 3.55271e-15, 0, 1, 0, -3.55271e-15, 0, 1, 9.90113, -0.0549407, -0.085681)
[node name="InfiniteScroller" parent="Train2" instance=ExtResource("5_3jhcw")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -4, -99)
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] [node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(0.875944, -0.294781, 0.381872, -0.106805, 0.65344, 0.749406, -0.470441, -0.697224, 0.540892, 0, 8.25958, 0) transform = Transform3D(0.875944, -0.294781, 0.381872, -0.106805, 0.65344, 0.749406, -0.470441, -0.697224, 0.540892, 0, 8.25958, 0)
visible = false visible = false

30
menu/Speedometer.gd Normal file
View File

@@ -0,0 +1,30 @@
extends CanvasLayer
var currentSpeed
var maxSpeed = float(TrainEngine.maxSpeed)
var minSpeed = 0.0
var deg
var rad
@onready var root = self.get_parent()
func _ready():
#get Game Node reference
while not root is Game:
root = root.get_parent()
print(root.name)
print(maxSpeed)
#acceptable rotations range from -35 to +35 degrees
func _process(delta):
currentSpeed = root.p1_train.current_speed
deg = ((70.0/maxSpeed)* currentSpeed) - 35.0
rad = (deg * 3.14)/180.0
self.get_node("Pfeil").rotation = rad
func round_to_digit(num, digit):
return round(num * pow(10.0, digit)) / pow(10.0, digit)

View File

@@ -0,0 +1,30 @@
[gd_scene load_steps=5 format=3 uid="uid://cunv4n2t33057"]
[ext_resource type="Texture2D" uid="uid://cj5tvg0uksgif" path="res://Assets/Textures/GUI/Speedometer_background.png" id="1_8h3os"]
[ext_resource type="Script" path="res://menu/Scripts/Speedometer.gd" id="1_qr0vh"]
[ext_resource type="Texture2D" uid="uid://hy1r4mahhob2" path="res://Assets/Textures/GUI/Speedometer_pointer.png" id="2_vm8nm"]
[ext_resource type="Texture2D" uid="uid://c8087dusjhilc" path="res://Assets/Textures/GUI/Speedometer_foreground.png" id="3_7tp67"]
[node name="Speedometer" type="CanvasLayer"]
script = ExtResource("1_qr0vh")
[node name="Background" type="TextureRect" parent="."]
offset_right = 472.0
offset_bottom = 463.0
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("1_8h3os")
[node name="Pfeil" type="TextureRect" parent="."]
offset_right = 472.0
offset_bottom = 463.0
scale = Vector2(0.9, 0.9)
pivot_offset = Vector2(242, 320)
texture = ExtResource("2_vm8nm")
[node name="Foreground" type="TextureRect" parent="."]
offset_right = 472.0
offset_bottom = 463.0
pivot_offset = Vector2(230, 230)
texture = ExtResource("3_7tp67")
metadata/_edit_use_anchors_ = true

45
menu/stats_player_1.tscn Normal file
View File

@@ -0,0 +1,45 @@
[gd_scene load_steps=3 format=3 uid="uid://c8als41yc56ep"]
[ext_resource type="PackedScene" uid="uid://cunv4n2t33057" path="res://menu/Speedometer_player1.tscn" id="1_8v7ps"]
[ext_resource type="Texture2D" uid="uid://c62xglrjom4sn" path="res://Assets/Textures/GUI/frame_player1.png" id="2_1uihe"]
[node name="Stats_Player1" type="CanvasLayer"]
[node name="Speedometer_player1" parent="." instance=ExtResource("1_8v7ps")]
scale = Vector2(0.4, 0.4)
transform = Transform2D(0.4, 0, 0, 0.4, 0, 0)
[node name="Rahmen" type="CanvasLayer" parent="."]
[node name="Rahmen" type="TextureRect" parent="Rahmen"]
offset_right = 463.0
offset_bottom = 562.0
scale = Vector2(0.5, 0.5)
texture = ExtResource("2_1uihe")
[node name="Ressourcen" type="CanvasLayer" parent="Rahmen"]
[node name="HBoxContainer" type="HBoxContainer" parent="Rahmen/Ressourcen"]
offset_left = 40.0
offset_top = 226.0
offset_right = 123.0
offset_bottom = 256.0
[node name="VBoxContainer" type="VBoxContainer" parent="Rahmen/Ressourcen/HBoxContainer"]
offset_right = 10.0
offset_bottom = 30.0
[node name="TextureRect" type="TextureRect" parent="Rahmen/Ressourcen/HBoxContainer/VBoxContainer"]
offset_right = 10.0
[node name="Label" type="Label" parent="Rahmen/Ressourcen/HBoxContainer/VBoxContainer"]
offset_top = 4.0
offset_right = 10.0
offset_bottom = 30.0
text = "5
"
[node name="VBoxContainer2" type="VBoxContainer" parent="Rahmen/Ressourcen/HBoxContainer"]
offset_left = 14.0
offset_right = 14.0
offset_bottom = 30.0

View File

@@ -29,7 +29,7 @@ _global_script_classes=[{
"language": &"GDScript", "language": &"GDScript",
"path": "res://scripts/Logic/MapNode.gd" "path": "res://scripts/Logic/MapNode.gd"
}, { }, {
"base": "Node", "base": "StaticBody3D",
"class": &"Module", "class": &"Module",
"language": &"GDScript", "language": &"GDScript",
"path": "res://scripts/Modules/Module.gd" "path": "res://scripts/Modules/Module.gd"