mirror of
https://github.com/PfandBoss/SemesterGameJam2022.git
synced 2025-11-12 04:16:12 +01:00
JA
This commit is contained in:
@@ -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"]
|
[ext_resource type="Script" path="res://scripts/Modules/Module.gd" id="1_42v8k"]
|
||||||
|
|
||||||
[node name="Node" type="Node"]
|
|
||||||
script = ExtResource("1_42v8k")
|
|
||||||
|
|||||||
6
Nodes/cannon.tscn
Normal file
6
Nodes/cannon.tscn
Normal 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")
|
||||||
@@ -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"]
|
[ext_resource type="Script" path="res://scripts/Logic/Game.gd" id="1_iox18"]
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ skeleton = NodePath("../..")
|
|||||||
curve = SubResource("Curve3D_ycdkn")
|
curve = SubResource("Curve3D_ycdkn")
|
||||||
|
|
||||||
[node name="PathFollow3D" type="PathFollow3D" parent="Player2Path"]
|
[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"]
|
[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)
|
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)
|
||||||
|
|||||||
@@ -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")
|
|
||||||
@@ -12,22 +12,22 @@ _global_script_classes=[{
|
|||||||
"base": "Module",
|
"base": "Module",
|
||||||
"class": &"Cannon",
|
"class": &"Cannon",
|
||||||
"language": &"GDScript",
|
"language": &"GDScript",
|
||||||
"path": "res://Cannon.gd"
|
"path": "res://scripts/Modules/Cannon.gd"
|
||||||
}, {
|
}, {
|
||||||
"base": "Node",
|
"base": "Node",
|
||||||
"class": &"Module",
|
"class": &"Module",
|
||||||
"language": &"GDScript",
|
"language": &"GDScript",
|
||||||
"path": "res://Module.gd"
|
"path": "res://scripts/Modules/Module.gd"
|
||||||
}, {
|
}, {
|
||||||
"base": "Module",
|
"base": "Module",
|
||||||
"class": &"Storage",
|
"class": &"Storage",
|
||||||
"language": &"GDScript",
|
"language": &"GDScript",
|
||||||
"path": "res://Storage.gd"
|
"path": "res://scripts/Modules/Storage.gd"
|
||||||
}, {
|
}, {
|
||||||
"base": "Module",
|
"base": "Module",
|
||||||
"class": &"TrainEngine",
|
"class": &"TrainEngine",
|
||||||
"language": &"GDScript",
|
"language": &"GDScript",
|
||||||
"path": "res://Engine.gd"
|
"path": "res://scripts/Modules/Engine.gd"
|
||||||
}]
|
}]
|
||||||
_global_script_class_icons={
|
_global_script_class_icons={
|
||||||
"Cannon": "",
|
"Cannon": "",
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ enum STATE {INACTIVE, RELOADING, SHOOTING}
|
|||||||
#------------Methods-------------#
|
#------------Methods-------------#
|
||||||
func _ready():
|
func _ready():
|
||||||
var root = get_tree().root.get_child(0)
|
var root = get_tree().root.get_child(0)
|
||||||
root.shooting.connect(_on_signal_shooting)
|
root.shoot.connect(_on_signal_shooting)
|
||||||
maxStashValue = 1
|
maxStashValue = 1
|
||||||
currentStashValue = 0
|
currentStashValue = 0
|
||||||
currentState = STATE.INACTIVE
|
currentState = STATE.INACTIVE
|
||||||
@@ -23,6 +23,7 @@ func interact():
|
|||||||
return
|
return
|
||||||
|
|
||||||
func _on_signal_shooting():
|
func _on_signal_shooting():
|
||||||
|
print("hit")
|
||||||
if currentStashValue >= 1 and currentState == STATE.INACTIVE:
|
if currentStashValue >= 1 and currentState == STATE.INACTIVE:
|
||||||
currentState = STATE.SHOOTING
|
currentState = STATE.SHOOTING
|
||||||
--currentStashValue
|
--currentStashValue
|
||||||
Reference in New Issue
Block a user