mirror of
https://github.com/PfandBoss/SemesterGameJam2022.git
synced 2025-11-12 04:16:12 +01:00
added icons when near storage
This commit is contained in:
BIN
Assets/Textures/Opera_senza_titolo (1).png
Normal file
BIN
Assets/Textures/Opera_senza_titolo (1).png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 470 KiB |
36
Assets/Textures/Opera_senza_titolo (1).png.import
Normal file
36
Assets/Textures/Opera_senza_titolo (1).png.import
Normal file
@@ -0,0 +1,36 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://biyvvql2ufkdf"
|
||||
path.s3tc="res://.godot/imported/Opera_senza_titolo (1).png-25dbee0de56c7859add7106467c21436.s3tc.ctex"
|
||||
path.etc2="res://.godot/imported/Opera_senza_titolo (1).png-25dbee0de56c7859add7106467c21436.etc2.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc", "etc2"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/Textures/Opera_senza_titolo (1).png"
|
||||
dest_files=["res://.godot/imported/Opera_senza_titolo (1).png-25dbee0de56c7859add7106467c21436.s3tc.ctex", "res://.godot/imported/Opera_senza_titolo (1).png-25dbee0de56c7859add7106467c21436.etc2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
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=0
|
||||
BIN
Assets/Textures/Opera_senza_titolo (2).png
Normal file
BIN
Assets/Textures/Opera_senza_titolo (2).png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 568 KiB |
36
Assets/Textures/Opera_senza_titolo (2).png.import
Normal file
36
Assets/Textures/Opera_senza_titolo (2).png.import
Normal file
@@ -0,0 +1,36 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bhmyyu0uhx541"
|
||||
path.s3tc="res://.godot/imported/Opera_senza_titolo (2).png-18daf683486c3c1f1928755a41dbce09.s3tc.ctex"
|
||||
path.etc2="res://.godot/imported/Opera_senza_titolo (2).png-18daf683486c3c1f1928755a41dbce09.etc2.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc", "etc2"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/Textures/Opera_senza_titolo (2).png"
|
||||
dest_files=["res://.godot/imported/Opera_senza_titolo (2).png-18daf683486c3c1f1928755a41dbce09.s3tc.ctex", "res://.godot/imported/Opera_senza_titolo (2).png-18daf683486c3c1f1928755a41dbce09.etc2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
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=0
|
||||
BIN
Assets/Textures/Opera_senza_titolo.png
Normal file
BIN
Assets/Textures/Opera_senza_titolo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 330 KiB |
36
Assets/Textures/Opera_senza_titolo.png.import
Normal file
36
Assets/Textures/Opera_senza_titolo.png.import
Normal file
@@ -0,0 +1,36 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cet5o7wla1x7t"
|
||||
path.s3tc="res://.godot/imported/Opera_senza_titolo.png-b572925c3cfbdcda723be9c32de6e84b.s3tc.ctex"
|
||||
path.etc2="res://.godot/imported/Opera_senza_titolo.png-b572925c3cfbdcda723be9c32de6e84b.etc2.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc", "etc2"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/Textures/Opera_senza_titolo.png"
|
||||
dest_files=["res://.godot/imported/Opera_senza_titolo.png-b572925c3cfbdcda723be9c32de6e84b.s3tc.ctex", "res://.godot/imported/Opera_senza_titolo.png-b572925c3cfbdcda723be9c32de6e84b.etc2.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
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=0
|
||||
@@ -11,6 +11,7 @@ radius = 0.808068
|
||||
|
||||
[node name="CharacterBody3D" type="CharacterBody3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3, 0)
|
||||
collision_mask = 3
|
||||
script = ExtResource("1_dta8q")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://cqkd0g15r5btu"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://db0pxwq1hvs45"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/Logic/Game.gd" id="1_gf730"]
|
||||
[ext_resource type="PackedScene" path="res://Nodes/light_setup.tscn" id="2_8im8o"]
|
||||
|
||||
52
Nodes/game2.tscn
Normal file
52
Nodes/game2.tscn
Normal file
@@ -0,0 +1,52 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://dyw054t0rhigr"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/Logic/Game.gd" id="1_gf730"]
|
||||
[ext_resource type="PackedScene" path="res://Nodes/light_setup.tscn" id="2_8im8o"]
|
||||
[ext_resource type="PackedScene" uid="uid://bqe8ucbruto1j" path="res://Nodes/StartNode.tscn" id="3_s558u"]
|
||||
[ext_resource type="PackedScene" uid="uid://md2ofbviios3" path="res://Nodes/Train_P1.tscn" id="4_05mbx"]
|
||||
[ext_resource type="PackedScene" uid="uid://bikdn7ep2vpxw" path="res://Nodes/Train_P2.tscn" id="5_gee2r"]
|
||||
[ext_resource type="PackedScene" uid="uid://cys06pnxfjl2m" path="res://Nodes/UI.tscn" id="6_l0q7q"]
|
||||
[ext_resource type="AudioStream" uid="uid://c5jhukuk8r3mf" path="res://Assets/Sounds/_MUSIC_/GameJamGameLoop.wav" id="7_0xbd4"]
|
||||
[ext_resource type="AudioStream" uid="uid://n4ynf7hg2pcl" path="res://Assets/Sounds/_SOUNDFX_/GleiseLoop.wav" id="8_1d2gk"]
|
||||
[ext_resource type="AudioStream" uid="uid://dovvnflvxtqpi" path="res://Assets/Sounds/_SOUNDFX_/WindLoop.wav" id="9_8qwj6"]
|
||||
|
||||
[node name="Game" type="Node"]
|
||||
script = ExtResource("1_gf730")
|
||||
|
||||
[node name="LightSetup" parent="." instance=ExtResource("2_8im8o")]
|
||||
|
||||
[node name="StartNode" parent="." instance=ExtResource("3_s558u")]
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.5, 0.866025, 0, -0.866025, 0.5, 0, 43, 26.0132)
|
||||
current = true
|
||||
fov = 30.0
|
||||
size = 32.0
|
||||
near = 0.041
|
||||
|
||||
[node name="Train1" parent="." instance=ExtResource("4_05mbx")]
|
||||
transform = Transform3D(1, 0, 3.55271e-15, 0, 1, 0, -3.55271e-15, 0, 1, -10, 0, 0)
|
||||
|
||||
[node name="Train2" parent="." instance=ExtResource("5_gee2r")]
|
||||
transform = Transform3D(1, 0, 3.55271e-15, 0, 1, 0, -3.55271e-15, 0, 1, 9.90113, -0.0549407, -0.085681)
|
||||
|
||||
[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)
|
||||
visible = false
|
||||
|
||||
[node name="Control" parent="." instance=ExtResource("6_l0q7q")]
|
||||
|
||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource("7_0xbd4")
|
||||
volume_db = -27.238
|
||||
autoplay = true
|
||||
|
||||
[node name="AudioStreamPlayer2" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource("8_1d2gk")
|
||||
volume_db = -10.0
|
||||
autoplay = true
|
||||
|
||||
[node name="AudioStreamPlayer3" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource("9_8qwj6")
|
||||
volume_db = -2.476
|
||||
autoplay = true
|
||||
20
Storage.tscn
20
Storage.tscn
@@ -1,13 +1,18 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://cet80w4yr8rse"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://cet80w4yr8rse"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/Modules/Storage.gd" id="1_guwoh"]
|
||||
[ext_resource type="Texture2D" uid="uid://cjc4wohtjb73j" path="res://Chest.png" id="2_a5kei"]
|
||||
[ext_resource type="Texture2D" uid="uid://cet5o7wla1x7t" path="res://Assets/Textures/Opera_senza_titolo.png" id="3_ojyse"]
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_c1ipa"]
|
||||
height = 3.60519
|
||||
radius = 1.33696
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_orr2n"]
|
||||
radius = 3.22778
|
||||
|
||||
[node name="Storage" type="StaticBody3D"]
|
||||
collision_layer = 2
|
||||
script = ExtResource("1_guwoh")
|
||||
currentType = 0
|
||||
|
||||
@@ -20,3 +25,16 @@ transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 2,
|
||||
texture = ExtResource("2_a5kei")
|
||||
|
||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
|
||||
|
||||
[node name="Area3D" type="Area3D" parent="."]
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"]
|
||||
shape = SubResource("CylinderShape3D_orr2n")
|
||||
|
||||
[node name="Sprite3D2" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(0.15, 0, 0, 0, -6.55671e-09, 0.15, 0, -0.15, -6.55671e-09, 0, 3.10039, 0)
|
||||
visible = false
|
||||
texture = ExtResource("3_ojyse")
|
||||
|
||||
[connection signal="body_entered" from="Area3D" to="." method="on_Player_enter"]
|
||||
[connection signal="body_exited" from="Area3D" to="." method="on_Player_exit"]
|
||||
|
||||
@@ -29,11 +29,16 @@ _global_script_classes=[{
|
||||
"language": &"GDScript",
|
||||
"path": "res://scripts/Logic/MapNode.gd"
|
||||
}, {
|
||||
"base": "Node",
|
||||
"base": "StaticBody3D",
|
||||
"class": &"Module",
|
||||
"language": &"GDScript",
|
||||
"path": "res://scripts/Modules/Module.gd"
|
||||
}, {
|
||||
"base": "CharacterBody3D",
|
||||
"class": &"Player",
|
||||
"language": &"GDScript",
|
||||
"path": "res://scripts/Player.gd"
|
||||
}, {
|
||||
"base": "Module",
|
||||
"class": &"Storage",
|
||||
"language": &"GDScript",
|
||||
@@ -65,6 +70,7 @@ _global_script_class_icons={
|
||||
"Game": "",
|
||||
"MapNode": "",
|
||||
"Module": "",
|
||||
"Player": "",
|
||||
"Storage": "",
|
||||
"StraightMapNode": "",
|
||||
"Train": "",
|
||||
|
||||
@@ -7,7 +7,7 @@ enum TYPE {AMMO, GUNPOWDER, COAL}
|
||||
|
||||
@export var currentType: TYPE
|
||||
|
||||
|
||||
@export var icon : Texture2D
|
||||
@export var audioClip : AudioStreamWAV
|
||||
#------------Methods-------------#
|
||||
func _ready():
|
||||
@@ -15,6 +15,7 @@ func _ready():
|
||||
#root.ammo_pickup.connect(_on_signal_storing)
|
||||
maxStashValue = 10
|
||||
currentStashValue = 10
|
||||
$Sprite3D2.texture = icon
|
||||
$AudioStreamPlayer.stream = audioClip
|
||||
|
||||
func interact(player):
|
||||
@@ -29,3 +30,9 @@ func _on_signal_storing():
|
||||
currentStashValue += 1
|
||||
return
|
||||
|
||||
func on_Player_enter(blub):
|
||||
var bodies = $Area3D.get_overlapping_bodies()
|
||||
$Sprite3D2.visible = true
|
||||
|
||||
func on_Player_exit(blub):
|
||||
$Sprite3D2.visible = false
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
extends CharacterBody3D
|
||||
|
||||
class_name Player
|
||||
#-----------Parameters--------------#
|
||||
var SPEED = 10
|
||||
var movement = Vector3(0,0,0)
|
||||
@@ -177,3 +178,5 @@ func clearInventory():
|
||||
walking = "walking"
|
||||
idle = "idle"
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user