diff --git a/Giovanna.tscn b/Giovanna.tscn index 32039fe..dfa8884 100644 --- a/Giovanna.tscn +++ b/Giovanna.tscn @@ -20,6 +20,8 @@ var is_night := false var in_light := false func _ready(): + is_night = false + in_light = false print(\"In light: %s\" % in_light) func _process(delta): @@ -28,6 +30,7 @@ func _process(delta): ded_timer.start(0.4) func _on_LightCheck_entered(area): + print(area.name) in_light = true # print(\"In light: %s\" % in_light) @@ -84,7 +87,8 @@ __meta__ = { } [node name="LightCheck" type="Area2D" parent="PlayerStatus"] -collision_mask = 2 +collision_layer = 8 +collision_mask = 8 [node name="CollisionShape2D" type="CollisionShape2D" parent="PlayerStatus/LightCheck"] shape = SubResource( 4 ) diff --git a/light.tscn b/light.tscn index c7b78a9..d2684fe 100644 --- a/light.tscn +++ b/light.tscn @@ -44,6 +44,8 @@ animations = [ { [node name="light" type="Area2D"] position = Vector2( 0, -23 ) +collision_layer = 8 +collision_mask = 8 script = ExtResource( 8 ) __meta__ = { "_edit_horizontal_guides_": [ ] diff --git a/project.godot b/project.godot index 1abc136..89637d2 100644 --- a/project.godot +++ b/project.godot @@ -98,6 +98,10 @@ restart_game={ ] } +[layer_names] + +2d_physics/layer_4="Lights" + [physics] common/enable_pause_aware_picking=true