Logan sucks and im better than him

This commit is contained in:
Diego 2020-07-23 01:10:01 -05:00
parent 66be998db4
commit 58125eb887
2 changed files with 3 additions and 3 deletions

View file

@ -16,7 +16,7 @@ autoplay = true
[node name="Door" parent="." instance=ExtResource( 3 )] [node name="Door" parent="." instance=ExtResource( 3 )]
position = Vector2( 180, 128 ) position = Vector2( 180, 128 )
unlocked = false next_scene = "res://levels/Campaign/Level 1/Level 1.tscn"
[node name="CanvasModulate" type="CanvasModulate" parent="."] [node name="CanvasModulate" type="CanvasModulate" parent="."]
color = Color( 0.564706, 0.564706, 0.564706, 1 ) color = Color( 0.564706, 0.564706, 0.564706, 1 )

View file

@ -10,9 +10,9 @@ func _process(delta):
if $Area2D.get_overlapping_bodies().size() != 0: if $Area2D.get_overlapping_bodies().size() != 0:
if unlocked: if unlocked:
$Label.text = "F to Open" $Label.text = "F to Open"
if Input.is_action_pressed("open"): if Input.is_action_just_pressed("open"):
Player.current_scene = next_scene Player.current_scene = next_scene
get_tree().change_scene(next_scene) get_tree().change_scene(""+next_scene+"")
else: else:
$Label.text = "Locked" $Label.text = "Locked"
$Label.visible = true $Label.visible = true