mirror of
https://github.com/Dariasteam/Cows-Revenge.git
synced 2026-01-23 02:15:17 +00:00
Fix unlock levels bug
This commit is contained in:
parent
3043cd0bc3
commit
4e7c3d3da8
3 changed files with 5 additions and 5 deletions
|
|
@ -1567,8 +1567,6 @@ script/script = ExtResource( 13 )
|
|||
|
||||
[node name="Cages" type="Node2D" parent="."]
|
||||
|
||||
editor/display_folded = true
|
||||
|
||||
[node name="jail" parent="Cages" instance=ExtResource( 14 )]
|
||||
|
||||
transform/pos = Vector2( -1250, -2410 )
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@ export(PackedScene) var scene
|
|||
func _ready():
|
||||
set_process_input(true)
|
||||
|
||||
func _on_Button_pressed():
|
||||
func _on_Button_pressed():
|
||||
global.save_game()
|
||||
get_tree().set_pause(false)
|
||||
get_tree().change_scene_to(scene)
|
||||
|
||||
func _input(ev):
|
||||
if (ev.is_action_pressed("ui_cancel")):
|
||||
if (ev.is_action_pressed("ui_cancel")):
|
||||
_on_Button_pressed()
|
||||
|
|
@ -19,7 +19,8 @@ func _ready():
|
|||
func next_level():
|
||||
if (global.level < levels.size()):
|
||||
global.level += 1
|
||||
global.unlocked_levels += 1
|
||||
if (global.level >= global.unlocked_levels):
|
||||
global.unlocked_levels += 1
|
||||
global.save_game()
|
||||
viewport.get_child(0).queue_free()
|
||||
#reset_hud()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue