Add dumb label to power station
This commit is contained in:
1 parent
afe0a5d39c
commit
89d4d3a29c
2 files changed
+12
-4
No files matched your search
@@ -3,11 +3,15 @@ extends Spatial
|
||||
export var max_charge_capacity : int = 1
|
||||
export var time_to_generate : float = 120
|
||||
|
||||
var current_holding : int = 0
|
||||
var current_holding : int = 0 setget set_current_holding
|
||||
var current_timer : float = 0
|
||||
|
||||
func set_current_holding(new_value):
|
||||
current_holding = new_value
|
||||
$CointCount.text = "Charge Count: %d" % current_holding
|
||||
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
set_current_holding(current_holding)
|
||||
|
||||
func _process(delta):
|
||||
current_timer += delta
|
||||
@@ -18,12 +22,12 @@ func _process(delta):
|
||||
func generate_charge():
|
||||
if current_holding >= max_charge_capacity:
|
||||
return
|
||||
current_holding += 1
|
||||
self.current_holding += 1
|
||||
print("power station: charge generated")
|
||||
|
||||
func collect_charges_from_station():
|
||||
var charges_to_return : int = current_holding
|
||||
current_holding = 0
|
||||
self.current_holding = 0
|
||||
return charges_to_return
|
||||
|
||||
func _on_coin_machine_coin_requirement_met(player):
|
||||
|
||||
Reference in new issue
Block a user