mirror of
https://github.com/PfandBoss/SemesterGameJam2022.git
synced 2025-11-12 04:16:12 +01:00
Merge branch 'main' of https://github.com/PfandBoss/SemesterGameJam2022
This commit is contained in:
25
scripts/Modules/Engine.gd
Normal file
25
scripts/Modules/Engine.gd
Normal file
@@ -0,0 +1,25 @@
|
||||
extends Module
|
||||
class_name TrainEngine
|
||||
|
||||
|
||||
enum STATE {RUNNING, DEAD}
|
||||
|
||||
#------------Methods-------------#
|
||||
func _ready():
|
||||
var root = get_tree().root.get_child(0)
|
||||
maxStashValue = 100
|
||||
currentStashValue = 100
|
||||
currentState = STATE.RUNNING
|
||||
#TODO: FINISH
|
||||
func interact():
|
||||
if currentState == STATE.RUNNING:
|
||||
if currentStashValue < maxStashValue:
|
||||
currentStashValue += 10
|
||||
if currentStashValue > maxStashValue:
|
||||
currentStashValue = maxStashValue
|
||||
return
|
||||
#TODO: Repair Train
|
||||
currentState = STATE.RUNNING
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user