mirror of
https://github.com/PfandBoss/SemesterGameJam2022.git
synced 2025-11-12 04:16:12 +01:00
Leo - storage finished2.0
This commit is contained in:
@@ -5,5 +5,5 @@ class_name Bin
|
||||
@onready var train = get_parent() as Train
|
||||
|
||||
#------------Methods-------------#
|
||||
func interact():
|
||||
func interact(player):
|
||||
train.get_node("CharacterBody3D").inventory = 0
|
||||
|
||||
@@ -15,7 +15,7 @@ func _ready():
|
||||
currentStashValue = 1
|
||||
currentState = STATE.INACTIVE
|
||||
#TODO: FINISH
|
||||
func interact():
|
||||
func interact(player):
|
||||
|
||||
if currentState == STATE.INACTIVE:
|
||||
#TODO: RELOADING
|
||||
|
||||
@@ -15,7 +15,7 @@ func _ready():
|
||||
currentStashValue = 100
|
||||
currentState = STATE.RUNNING
|
||||
#TODO: FINISH
|
||||
func interact():
|
||||
func interact(player):
|
||||
if currentState == STATE.RUNNING:
|
||||
if (train.current_speed + refuelRate) <= maxSpeed:
|
||||
train.current_speed += refuelRate
|
||||
|
||||
@@ -20,7 +20,7 @@ enum MODULE_TYPE {CANNON, STEERING, ENGINE, STORAGE}
|
||||
#------------Methods-------------#
|
||||
|
||||
|
||||
func interact():
|
||||
func interact(player):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
@@ -11,11 +11,12 @@ func _ready():
|
||||
var root = get_tree().root.get_child(0)
|
||||
root.ammo_pickup.connect(_on_signal_storing)
|
||||
maxStashValue = 5
|
||||
currentStashValue = 0
|
||||
func interact():
|
||||
currentStashValue = 5
|
||||
|
||||
func interact(player):
|
||||
if currentStashValue >= 1:
|
||||
currentStashValue -= 1
|
||||
|
||||
player.fill_inventory(currentType)
|
||||
return
|
||||
|
||||
func _on_signal_storing():
|
||||
|
||||
Reference in New Issue
Block a user