mirror of
https://github.com/PfandBoss/SemesterGameJam2022.git
synced 2025-11-12 04:16:12 +01:00
Storages fixed
This commit is contained in:
@@ -22,6 +22,7 @@ animations = [{
|
|||||||
radius = 0.494048
|
radius = 0.494048
|
||||||
|
|
||||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_8lrgm"]
|
[sub_resource type="CylinderShape3D" id="CylinderShape3D_8lrgm"]
|
||||||
|
radius = 0.808068
|
||||||
|
|
||||||
[node name="CharacterBody3D" type="CharacterBody3D"]
|
[node name="CharacterBody3D" type="CharacterBody3D"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3, 0)
|
||||||
@@ -39,7 +40,6 @@ 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_mask = 4
|
|
||||||
|
|
||||||
[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)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_c1ipa"]
|
[sub_resource type="CylinderShape3D" id="CylinderShape3D_c1ipa"]
|
||||||
height = 3.60519
|
height = 3.60519
|
||||||
radius = 2.08877
|
radius = 1.33696
|
||||||
|
|
||||||
[node name="Storage" type="StaticBody3D"]
|
[node name="Storage" type="StaticBody3D"]
|
||||||
script = ExtResource("1_guwoh")
|
script = ExtResource("1_guwoh")
|
||||||
|
|||||||
15
player.tscn
15
player.tscn
@@ -1,8 +1,11 @@
|
|||||||
[gd_scene load_steps=6 format=3 uid="uid://lvlbpfnwlngv"]
|
[gd_scene load_steps=8 format=3 uid="uid://lvlbpfnwlngv"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://scripts/Train.gd" id="1_0x664"]
|
[ext_resource type="Script" path="res://scripts/Train.gd" id="1_0x664"]
|
||||||
[ext_resource type="PackedScene" uid="uid://byo1m0n20yl45" path="res://Nodes/cannon.tscn" id="2_71mfj"]
|
[ext_resource type="PackedScene" uid="uid://byo1m0n20yl45" path="res://Nodes/cannon.tscn" id="2_71mfj"]
|
||||||
[ext_resource type="PackedScene" uid="uid://vwjd5od63jgh" path="res://Nodes/Player.tscn" id="3_in6up"]
|
[ext_resource type="PackedScene" uid="uid://vwjd5od63jgh" path="res://Nodes/Player.tscn" id="3_in6up"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://cet80w4yr8rse" path="res://Storage.tscn" id="4_unqt6"]
|
||||||
|
|
||||||
|
[sub_resource type="CylinderMesh" id="CylinderMesh_2q7m8"]
|
||||||
|
|
||||||
[sub_resource type="BoxMesh" id="BoxMesh_ognqx"]
|
[sub_resource type="BoxMesh" id="BoxMesh_ognqx"]
|
||||||
size = Vector3(13, 1, 25)
|
size = Vector3(13, 1, 25)
|
||||||
@@ -15,7 +18,12 @@ transform = Transform3D(1, 0, 3.55271e-15, 0, 1, 0, -3.55271e-15, 0, 1, -12, 0,
|
|||||||
script = ExtResource("1_0x664")
|
script = ExtResource("1_0x664")
|
||||||
|
|
||||||
[node name="Cannon" parent="." instance=ExtResource("2_71mfj")]
|
[node name="Cannon" parent="." instance=ExtResource("2_71mfj")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.52346, 1.58651, -1.96232e-14)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6.00885, 1.58651, -2.74986)
|
||||||
|
|
||||||
|
[node name="MeshInstance3D" type="MeshInstance3D" parent="Cannon"]
|
||||||
|
transform = Transform3D(1, 0, -3.55271e-15, 0, 1, 0, 3.55271e-15, 0, 1, 0, 0, 0)
|
||||||
|
mesh = SubResource("CylinderMesh_2q7m8")
|
||||||
|
skeleton = NodePath("../../CharacterBody3D")
|
||||||
|
|
||||||
[node name="MeshInstance3D2" type="MeshInstance3D" parent="."]
|
[node name="MeshInstance3D2" type="MeshInstance3D" parent="."]
|
||||||
mesh = SubResource("BoxMesh_ognqx")
|
mesh = SubResource("BoxMesh_ognqx")
|
||||||
@@ -28,4 +36,5 @@ shape = SubResource("ConcavePolygonShape3D_p3d4e")
|
|||||||
[node name="CharacterBody3D" parent="." instance=ExtResource("3_in6up")]
|
[node name="CharacterBody3D" parent="." instance=ExtResource("3_in6up")]
|
||||||
transform = Transform3D(1, 0, -3.55271e-15, 0, 1, 0, 3.55271e-15, 0, 1, 0, 3, 0)
|
transform = Transform3D(1, 0, -3.55271e-15, 0, 1, 0, 3.55271e-15, 0, 1, 0, 3, 0)
|
||||||
|
|
||||||
[node name="Cannon2" parent="." instance=ExtResource("2_71mfj")]
|
[node name="Storage" parent="." instance=ExtResource("4_unqt6")]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.3638, 0, 3.41344)
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ func check_interaction():
|
|||||||
if Input.is_action_just_pressed(action):
|
if Input.is_action_just_pressed(action):
|
||||||
for body in $HitBox.get_overlapping_bodies():
|
for body in $HitBox.get_overlapping_bodies():
|
||||||
if body is Module:
|
if body is Module:
|
||||||
|
|
||||||
#Storage interaction
|
#Storage interaction
|
||||||
if not inventory && body is Storage:
|
if not inventory && body is Storage:
|
||||||
body.interact(self)
|
body.interact(self)
|
||||||
@@ -73,3 +74,4 @@ func check_interaction():
|
|||||||
func fill_inventory(type):
|
func fill_inventory(type):
|
||||||
self.inventory = 1
|
self.inventory = 1
|
||||||
self.resource = type
|
self.resource = type
|
||||||
|
print(self.resource)
|
||||||
|
|||||||
Reference in New Issue
Block a user