more hub world tweaking
This commit is contained in:
@@ -2,6 +2,7 @@ extends Node
|
||||
|
||||
var game_loaded = false
|
||||
var high_score : int = 0
|
||||
var deposited_money
|
||||
var money : int = 0
|
||||
var health
|
||||
var held_guns = []
|
||||
@@ -13,18 +14,16 @@ func _ready() -> void:
|
||||
SignalBus.money_deposited.connect(deposit_money)
|
||||
|
||||
func deposit_money():
|
||||
if money > high_score:
|
||||
high_score = money
|
||||
deposited_money = money
|
||||
if deposited_money > high_score:
|
||||
high_score = deposited_money
|
||||
|
||||
func money_penalty():
|
||||
var level_control = get_tree().current_scene
|
||||
|
||||
#Save High Scores
|
||||
if money >= high_score:
|
||||
high_score = money
|
||||
|
||||
#Do money penalty
|
||||
money = money * level_control.gamemode.money_lost_multiplier
|
||||
deposited_money = money
|
||||
|
||||
func weapon_penalty():
|
||||
var level_control = get_tree().current_scene
|
||||
|
||||
Reference in New Issue
Block a user