mirror of
https://github.com/PfandBoss/SemesterGameJam2022.git
synced 2025-11-12 12:16:14 +01:00
Merge branch 'main' of github.com:PfandBoss/SemesterGameJam2022
This commit is contained in:
BIN
Assets/Textures/GUI/Speedometer_background.png
Normal file
BIN
Assets/Textures/GUI/Speedometer_background.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
34
Assets/Textures/GUI/Speedometer_background.png.import
Normal file
34
Assets/Textures/GUI/Speedometer_background.png.import
Normal 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
|
||||||
BIN
Assets/Textures/GUI/Speedometer_foreground.png
Normal file
BIN
Assets/Textures/GUI/Speedometer_foreground.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
34
Assets/Textures/GUI/Speedometer_foreground.png.import
Normal file
34
Assets/Textures/GUI/Speedometer_foreground.png.import
Normal 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
|
||||||
BIN
Assets/Textures/GUI/Speedometer_pointer.png
Normal file
BIN
Assets/Textures/GUI/Speedometer_pointer.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
34
Assets/Textures/GUI/Speedometer_pointer.png.import
Normal file
34
Assets/Textures/GUI/Speedometer_pointer.png.import
Normal 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
|
||||||
BIN
Assets/Textures/GUI/frame_player1.png
Normal file
BIN
Assets/Textures/GUI/frame_player1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
34
Assets/Textures/GUI/frame_player1.png.import
Normal file
34
Assets/Textures/GUI/frame_player1.png.import
Normal 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
|
||||||
30
menu/Speedometer.gd
Normal file
30
menu/Speedometer.gd
Normal 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)
|
||||||
30
menu/Speedometer_player1.tscn
Normal file
30
menu/Speedometer_player1.tscn
Normal 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
45
menu/stats_player_1.tscn
Normal 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
|
||||||
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user