This commit is contained in:
PfandBoss
2022-12-10 02:35:47 +01:00
parent fce9eff26e
commit c76634285b
9 changed files with 16 additions and 18 deletions

View File

@@ -1,6 +1,3 @@
[gd_scene load_steps=2 format=3 uid="uid://b87b68ghm4dkk"]
[gd_scene load_steps=2 format=3]
[ext_resource type="Script" path="res://Module.gd" id="1_42v8k"]
[node name="Node" type="Node"]
script = ExtResource("1_42v8k")
[ext_resource type="Script" path="res://scripts/Modules/Module.gd" id="1_42v8k"]

6
Nodes/cannon.tscn Normal file
View File

@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://kupfq75m0v37"]
[ext_resource type="Script" path="res://scripts/Modules/Cannon.gd" id="1_vdn0s"]
[node name="Cannon" type="Node"]
script = ExtResource("1_vdn0s")

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=5 format=3 uid="uid://n7w0ff7u25yc"]
[gd_scene load_steps=5 format=3 uid="uid://bl1yrgr7g06db"]
[ext_resource type="Script" path="res://scripts/Logic/Game.gd" id="1_iox18"]
@@ -42,7 +42,7 @@ skeleton = NodePath("../..")
curve = SubResource("Curve3D_ycdkn")
[node name="PathFollow3D" type="PathFollow3D" parent="Player2Path"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -16)
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0, -16)
[node name="root" type="Node3D" parent="Player2Path/PathFollow3D"]
transform = Transform3D(-0.0154456, -6.75146e-10, -0.999881, -5.21344e-12, 1, -6.75146e-10, 0.999881, -5.21341e-12, -0.0154456, 0, 0, 0)

View File

@@ -1,6 +0,0 @@
[gd_scene load_steps=2 format=3 uid="uid://d2g0of2prwwj4"]
[ext_resource type="Script" path="res://Cannon.gd" id="1_mopo1"]
[node name="Cannon" type="Node"]
script = ExtResource("1_mopo1")

View File

@@ -12,22 +12,22 @@ _global_script_classes=[{
"base": "Module",
"class": &"Cannon",
"language": &"GDScript",
"path": "res://Cannon.gd"
"path": "res://scripts/Modules/Cannon.gd"
}, {
"base": "Node",
"class": &"Module",
"language": &"GDScript",
"path": "res://Module.gd"
"path": "res://scripts/Modules/Module.gd"
}, {
"base": "Module",
"class": &"Storage",
"language": &"GDScript",
"path": "res://Storage.gd"
"path": "res://scripts/Modules/Storage.gd"
}, {
"base": "Module",
"class": &"TrainEngine",
"language": &"GDScript",
"path": "res://Engine.gd"
"path": "res://scripts/Modules/Engine.gd"
}]
_global_script_class_icons={
"Cannon": "",

View File

@@ -7,7 +7,7 @@ enum STATE {INACTIVE, RELOADING, SHOOTING}
#------------Methods-------------#
func _ready():
var root = get_tree().root.get_child(0)
root.shooting.connect(_on_signal_shooting)
root.shoot.connect(_on_signal_shooting)
maxStashValue = 1
currentStashValue = 0
currentState = STATE.INACTIVE
@@ -23,6 +23,7 @@ func interact():
return
func _on_signal_shooting():
print("hit")
if currentStashValue >= 1 and currentState == STATE.INACTIVE:
currentState = STATE.SHOOTING
--currentStashValue