level bounds now don't error out on save/quit
This commit is contained in:
@@ -60,15 +60,7 @@ func _ready():
|
||||
else:
|
||||
refresh_scene()
|
||||
|
||||
#Spawn Crown
|
||||
if GameGlobals.last_hit_path:
|
||||
var crown_spawn = CROWN.instantiate()
|
||||
var crown_target = get_node(GameGlobals.last_hit_path)
|
||||
if crown_target:
|
||||
crown_target.add_child(crown_spawn)
|
||||
crown_spawn.position = Vector3(0,2,0)
|
||||
if crown_target.is_in_group("enemy"):
|
||||
crown_target.loot_amount = 10
|
||||
spawn_crown()
|
||||
#global randomize function
|
||||
randomize()
|
||||
|
||||
@@ -104,7 +96,17 @@ func _ready():
|
||||
func refresh_scene():
|
||||
GameGlobals.health = gamemode.start_health
|
||||
|
||||
|
||||
|
||||
func spawn_crown():
|
||||
#Spawn Crown
|
||||
if GameGlobals.last_hit_path:
|
||||
var crown_spawn = CROWN.instantiate()
|
||||
var crown_target = get_node(GameGlobals.last_hit_path)
|
||||
if crown_target:
|
||||
crown_target.add_child(crown_spawn)
|
||||
crown_spawn.position = Vector3(0,2,0)
|
||||
if crown_target.is_in_group("enemy"):
|
||||
crown_target.loot_amount = 10
|
||||
|
||||
func gun_spawn(index):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user