mirror of
https://github.com/PfandBoss/SemesterGameJam2022.git
synced 2025-11-12 12:16:14 +01:00
add train
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")
|
||||||
|
|||||||
@@ -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