diff --git a/Chest.png b/Chest.png new file mode 100644 index 0000000..696a3f3 Binary files /dev/null and b/Chest.png differ diff --git a/Chest.png.import b/Chest.png.import new file mode 100644 index 0000000..df3f87c --- /dev/null +++ b/Chest.png.import @@ -0,0 +1,36 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cjc4wohtjb73j" +path.s3tc="res://.godot/imported/Chest.png-017d8397062a17fb93a3b0c3debc27a2.s3tc.ctex" +path.etc2="res://.godot/imported/Chest.png-017d8397062a17fb93a3b0c3debc27a2.etc2.ctex" +metadata={ +"imported_formats": ["s3tc", "etc2"], +"vram_texture": true +} + +[deps] + +source_file="res://Chest.png" +dest_files=["res://.godot/imported/Chest.png-017d8397062a17fb93a3b0c3debc27a2.s3tc.ctex", "res://.godot/imported/Chest.png-017d8397062a17fb93a3b0c3debc27a2.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 diff --git a/Nodes/Player.tscn b/Nodes/Player.tscn index 43bd028..152cb4d 100644 --- a/Nodes/Player.tscn +++ b/Nodes/Player.tscn @@ -24,7 +24,8 @@ radius = 0.500599 height = 1.99403 [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_ndwdl"] -radius = 0.567567 +radius = 1.26679 +height = 2.53358 [node name="CharacterBody3D" type="CharacterBody3D"] script = ExtResource("1_dta8q") @@ -42,7 +43,6 @@ visible = false texture = ExtResource("2_yjfj7") [node name="CollisionShape3D" type="CollisionShape3D" parent="."] -visible = false shape = SubResource("CapsuleShape3D_p76ml") [node name="HitBox" type="Area3D" parent="."] diff --git a/Nodes/cannon.tscn b/Nodes/cannon.tscn index 1771df1..0c377e8 100644 --- a/Nodes/cannon.tscn +++ b/Nodes/cannon.tscn @@ -1,6 +1,11 @@ -[gd_scene load_steps=2 format=3 uid="uid://byo1m0n20yl45"] +[gd_scene load_steps=3 format=3 uid="uid://byo1m0n20yl45"] [ext_resource type="Script" path="res://scripts/Modules/Cannon.gd" id="1_vdn0s"] -[node name="Cannon" type="Node"] +[sub_resource type="CylinderShape3D" id="CylinderShape3D_2geka"] + +[node name="Cannon" type="StaticBody3D"] script = ExtResource("1_vdn0s") + +[node name="CollisionShape3D" type="CollisionShape3D" parent="."] +shape = SubResource("CylinderShape3D_2geka") diff --git a/Nodes/game.tscn b/Nodes/game.tscn deleted file mode 100644 index 238745d..0000000 --- a/Nodes/game.tscn +++ /dev/null @@ -1,22 +0,0 @@ -[gd_scene load_steps=5 format=3 uid="uid://cp2itfdd21cg2"] - -[ext_resource type="Script" path="res://scripts/Logic/Game.gd" id="1_iox18"] -[ext_resource type="PackedScene" uid="uid://bqe8ucbruto1j" path="res://Nodes/StartNode.tscn" id="2_61aog"] -[ext_resource type="PackedScene" uid="uid://lvlbpfnwlngv" path="res://player.tscn" id="3_kknxo"] -[ext_resource type="PackedScene" uid="uid://cys06pnxfjl2m" path="res://Nodes/UI.tscn" id="4_kxuy0"] - -[node name="Game" type="Node"] -script = ExtResource("1_iox18") - -[node name="StartNode" parent="." instance=ExtResource("2_61aog")] - -[node name="Camera3D" type="Camera3D" parent="."] -transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 20, 0) -current = true - -[node name="Player1" parent="." instance=ExtResource("3_kknxo")] - -[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] -transform = Transform3D(1, 0, 0, 0, 0.258819, 0.965926, 0, -0.965926, 0.258819, 0, 0, 0) - -[node name="Control" parent="." instance=ExtResource("4_kxuy0")] diff --git a/Storage.tscn b/Storage.tscn index 4828e40..5c9fce1 100644 --- a/Storage.tscn +++ b/Storage.tscn @@ -1,7 +1,19 @@ -[gd_scene load_steps=2 format=3 uid="uid://cet80w4yr8rse"] +[gd_scene load_steps=4 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"] -[node name="Storage" type="Node"] +[sub_resource type="CylinderShape3D" id="CylinderShape3D_c1ipa"] +height = 3.60519 +radius = 1.29067 + +[node name="Storage" type="StaticBody3D"] script = ExtResource("1_guwoh") currentType = 0 + +[node name="CollisionShape3D" type="CollisionShape3D" parent="."] +shape = SubResource("CylinderShape3D_c1ipa") + +[node name="Sprite3D" type="Sprite3D" parent="."] +transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 2, 0) +texture = ExtResource("2_a5kei") diff --git a/menu/main_menu.tscn b/menu/main_menu.tscn index 91d0824..018cab6 100644 --- a/menu/main_menu.tscn +++ b/menu/main_menu.tscn @@ -13,7 +13,6 @@ grow_vertical = 2 script = ExtResource("1_hyw8p") [node name="ColorRect" type="ColorRect" parent="."] -layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 @@ -22,7 +21,6 @@ grow_vertical = 2 color = Color(0.513726, 0.403922, 0.27451, 1) [node name="VBoxContainer" type="VBoxContainer" parent="."] -layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 anchor_top = 0.5 @@ -36,27 +34,22 @@ grow_horizontal = 2 grow_vertical = 2 [node name="Start" type="Button" parent="VBoxContainer"] -layout_mode = 2 text = "Start " [node name="Tutorial" type="Button" parent="VBoxContainer"] -layout_mode = 2 text = "Tutorial " [node name="Settings" type="Button" parent="VBoxContainer"] -layout_mode = 2 text = "Volume:" [node name="VolSlider" type="HSlider" parent="VBoxContainer"] -layout_mode = 2 min_value = -30.0 max_value = 0.0 script = ExtResource("2_h85ei") [node name="Quit" type="Button" parent="VBoxContainer"] -layout_mode = 2 text = "Quit" [connection signal="pressed" from="VBoxContainer/Start" to="." method="_on_start_pressed"] diff --git a/project.godot b/project.godot index f9a62a0..127a278 100644 --- a/project.godot +++ b/project.godot @@ -10,6 +10,11 @@ config_version=5 _global_script_classes=[{ "base": "Module", +"class": &"Bin", +"language": &"GDScript", +"path": "res://scripts/Modules/Bin.gd" +}, { +"base": "Module", "class": &"Cannon", "language": &"GDScript", "path": "res://scripts/Modules/Cannon.gd" @@ -55,6 +60,7 @@ _global_script_classes=[{ "path": "res://scripts/Logic/TurnMapNode.gd" }] _global_script_class_icons={ +"Bin": "", "Cannon": "", "Game": "", "MapNode": "", diff --git a/scripts/Logic/Game.gd b/scripts/Logic/Game.gd index ae67381..23b49df 100644 --- a/scripts/Logic/Game.gd +++ b/scripts/Logic/Game.gd @@ -90,6 +90,7 @@ func _process(delta): if Input.is_action_pressed("test"): emit_signal("shoot") - + $Control/VSlider.value = p1_train.current_distance + $Control/VSlider2.value = p2_train.current_distance diff --git a/scripts/Modules/Bin.gd b/scripts/Modules/Bin.gd new file mode 100644 index 0000000..dacfdab --- /dev/null +++ b/scripts/Modules/Bin.gd @@ -0,0 +1,9 @@ +extends Module + +class_name Bin + +@onready var train = get_parent() as Train + +#------------Methods-------------# +func interact(): + train.get_node("CharacterBody3D").inventory = 0 diff --git a/scripts/Modules/Module.gd b/scripts/Modules/Module.gd index ca86d7d..8c2fc80 100644 --- a/scripts/Modules/Module.gd +++ b/scripts/Modules/Module.gd @@ -1,4 +1,4 @@ -extends Node +extends StaticBody3D class_name Module #-----------Parameters----------------' diff --git a/undefined - Imgur (1).png b/undefined - Imgur (1).png new file mode 100644 index 0000000..61d85d6 Binary files /dev/null and b/undefined - Imgur (1).png differ diff --git a/undefined - Imgur (1).png.import b/undefined - Imgur (1).png.import new file mode 100644 index 0000000..8a2d729 --- /dev/null +++ b/undefined - Imgur (1).png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b8rsm7uapp583" +path="res://.godot/imported/undefined - Imgur (1).png-0d6247a52be8c4b2fc393c73c25c8a7d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://undefined - Imgur (1).png" +dest_files=["res://.godot/imported/undefined - Imgur (1).png-0d6247a52be8c4b2fc393c73c25c8a7d.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 diff --git a/undefined - Imgur.png b/undefined - Imgur.png new file mode 100644 index 0000000..5db981b Binary files /dev/null and b/undefined - Imgur.png differ diff --git a/undefined - Imgur.png.import b/undefined - Imgur.png.import new file mode 100644 index 0000000..822c285 --- /dev/null +++ b/undefined - Imgur.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://44lfs83sax35" +path="res://.godot/imported/undefined - Imgur.png-b336c6cd076a57762001e473ecdfe2b4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://undefined - Imgur.png" +dest_files=["res://.godot/imported/undefined - Imgur.png-b336c6cd076a57762001e473ecdfe2b4.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