Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ signal pull_released(cancelled: bool)
signal observers_changed

const HOOKABLE_INDICATOR = preload("uid://dyldoadlxd7po")
const SHAPE_DEBUG_COLOR := Color(0.68, 0.28, 1.0, 0.42)

## The game entity that becomes hookable.
## [br][br]
Expand Down Expand Up @@ -87,6 +88,12 @@ func _enter_tree() -> void:
controlled_entity = get_parent()


func _notification(what: int) -> void:
match what:
NOTIFICATION_CHILD_ORDER_CHANGED when Engine.is_editor_hint():
_recolor_shapes()


func _ready() -> void:
collision_layer = 0
collision_mask = 0
Expand Down Expand Up @@ -157,3 +164,9 @@ func _set_hook_control(new_hook_control: HookControl) -> void:

func _on_observers_changed() -> void:
_indicator.bouncing = is_being_observed


func _recolor_shapes() -> void:
for child: Node in get_children():
if child is CollisionShape2D:
child.debug_color = SHAPE_DEBUG_COLOR
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ metadata/_custom_type_script = "uid://dabvr3pqmyya4"
[node name="CollisionShape2D" type="CollisionShape2D" parent="HookableArea" unique_id=68720889]
position = Vector2(0, -32)
shape = SubResource("RectangleShape2D_ml4a5")
debug_color = Color(0.689707, 0.288376, 1, 0.42)
debug_color = Color(0.68, 0.28, 1, 0.42)

[node name="AnchorMarker" type="Marker2D" parent="HookableArea" unique_id=1758696959]
position = Vector2(0, -16)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ weight = 0.0
[node name="CollisionShape2D" type="CollisionShape2D" parent="HookableArea" unique_id=1258628892]
position = Vector2(0, -24)
shape = SubResource("RectangleShape2D_atpgr")
debug_color = Color(0.689707, 0.288376, 1, 0.42)
debug_color = Color(0.68, 0.28, 1, 0.42)

[node name="Marker2D" type="Marker2D" parent="HookableArea" unique_id=646102193]
position = Vector2(0, -24)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ metadata/_custom_type_script = "uid://dabvr3pqmyya4"

[node name="CollisionShape2D" type="CollisionShape2D" parent="HookableArea" unique_id=503665020]
shape = SubResource("RectangleShape2D_h3468")
debug_color = Color(0.689707, 0.288376, 1, 0.42)
debug_color = Color(0.68, 0.28, 1, 0.42)
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ metadata/_custom_type_script = "uid://dabvr3pqmyya4"
[node name="CollisionShape2D" type="CollisionShape2D" parent="HookableArea" unique_id=1279070361]
position = Vector2(0, -28)
shape = SubResource("RectangleShape2D_bfd1i")
debug_color = Color(0.689707, 0.288376, 1, 0.42)
debug_color = Color(0.68, 0.28, 1, 0.42)

[node name="Marker2D" type="Marker2D" parent="HookableArea" unique_id=335701191]
position = Vector2(0, -45)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ anchor_point = NodePath("Marker2D")
[node name="CollisionShape2D" type="CollisionShape2D" parent="HookableArea" unique_id=1548966519]
position = Vector2(0, -28)
shape = SubResource("RectangleShape2D_bfd1i")
debug_color = Color(0.689707, 0.288376, 1, 0.42)
debug_color = Color(0.68, 0.28, 1, 0.42)

[node name="Marker2D" type="Marker2D" parent="HookableArea" unique_id=286043670]
position = Vector2(0, -46)
Expand Down
4 changes: 2 additions & 2 deletions scenes/game_elements/props/powerup/powerup.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ action = "Collect Repel"
unique_name_in_owner = true
position = Vector2(0, -33)
shape = SubResource("CircleShape2D_5vrqc")
debug_color = Color(0.600391, 0.54335, 0, 0.42)
debug_color = Color(0.6, 0.545, 0, 0.42)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh. Did I miss this one in #2678?


[node name="PowerupShadow" type="Sprite2D" parent="InteractArea" unique_id=1565501906]
position = Vector2(0, -34)
Expand Down Expand Up @@ -126,7 +126,7 @@ metadata/_custom_type_script = "uid://dabvr3pqmyya4"
unique_name_in_owner = true
position = Vector2(0, -33)
shape = SubResource("RectangleShape2D_spw1e")
debug_color = Color(0.689707, 0.288376, 1, 0.42)
debug_color = Color(0.68, 0.28, 1, 0.42)

[node name="Marker2D" type="Marker2D" parent="HookableArea" unique_id=1698747164]
position = Vector2(0, -33)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ metadata/_custom_type_script = "uid://dabvr3pqmyya4"
[node name="CollisionShape2D" type="CollisionShape2D" parent="HookableArea" unique_id=1356949742]
position = Vector2(0, -28)
shape = SubResource("RectangleShape2D_vrucw")
debug_color = Color(0.689707, 0.288376, 1, 0.42)
debug_color = Color(0.68, 0.28, 1, 0.42)

[node name="Marker2D" type="Marker2D" parent="HookableArea" unique_id=1674666531]
position = Vector2(0, -48)
Expand Down