mirror of
https://github.com/PfandBoss/SemesterGameJam2022.git
synced 2025-11-12 04:16:12 +01:00
Merge branch 'main' of github.com:PfandBoss/SemesterGameJam2022
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"]
|
||||
|
||||
[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
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"]
|
||||
|
||||
|
||||
7
Storage.tscn
Normal file
7
Storage.tscn
Normal file
@@ -0,0 +1,7 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://1sr52olklfyy"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/Modules/Storage.gd" id="1_guwoh"]
|
||||
|
||||
[node name="Storage" type="Node"]
|
||||
script = ExtResource("1_guwoh")
|
||||
currentType = 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",
|
||||
"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": "",
|
||||
|
||||
@@ -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
|
||||
@@ -17,15 +17,16 @@ func interact():
|
||||
#TODO: RELOADING
|
||||
if currentStashValue < maxStashValue:
|
||||
currentState = STATE.RELOADING
|
||||
++currentStashValue
|
||||
currentStashValue += 1
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
func _on_signal_shooting():
|
||||
print("hit")
|
||||
if currentStashValue >= 1 and currentState == STATE.INACTIVE:
|
||||
currentState = STATE.SHOOTING
|
||||
--currentStashValue
|
||||
currentStashValue -= 1
|
||||
#TODO: SHOOTING
|
||||
currentState = STATE.INACTIVE
|
||||
return
|
||||
@@ -17,7 +17,6 @@ func interact():
|
||||
currentStashValue += 10
|
||||
if currentStashValue > maxStashValue:
|
||||
currentStashValue = maxStashValue
|
||||
|
||||
return
|
||||
#TODO: Repair Train
|
||||
currentState = STATE.RUNNING
|
||||
@@ -9,15 +9,15 @@ enum TYPE {AMMO, GUNPOWDER, FUEL}
|
||||
#------------Methods-------------#
|
||||
func _ready():
|
||||
var root = get_tree().root.get_child(0)
|
||||
root.shooting.connect(_on_signal_storing)
|
||||
root.ammo_pickup.connect(_on_signal_storing)
|
||||
maxStashValue = 5
|
||||
currentStashValue = 0
|
||||
func interact():
|
||||
if currentStashValue >= 1:
|
||||
--currentStashValue
|
||||
currentStashValue -= 1
|
||||
return
|
||||
func _on_signal_storing():
|
||||
if currentStashValue < maxStashValue:
|
||||
++currentStashValue
|
||||
currentStashValue += 1
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user