Engine basic added

This commit is contained in:
PfandBoss
2022-12-10 02:03:09 +01:00
parent 86f9f1d2eb
commit 042576acff
3 changed files with 45 additions and 5 deletions

View File

@@ -3,6 +3,7 @@ extends Module
class_name Cannon
enum STATE {INACTIVE, RELOADING, SHOOTING}
#------------Methods-------------#
func _ready():
var root = get_tree().root.get_child(0)
@@ -22,8 +23,9 @@ func interact():
return
func _on_signal_shooting():
if currentStashValue == 1:
if currentStashValue == 1 and currentState == STATE.INACTIVE:
currentState = STATE.SHOOTING
#TODO: SHOOTING
currentState = STATE.INACTIVE
pass
#TODO: SHOOTING
currentState = STATE.INACTIVE
return