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
4 changes: 4 additions & 0 deletions entities/game/card_template/scenes/CardTemplate.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ target_offset = Vector2(13, 13)
animation_time = 0.1

[node name="CardBackground" type="NinePatchRect" parent="CardContentGroup" unique_id=589517874 groups=["card_content"]]
visible = false
offset_right = 500.0
offset_bottom = 500.0
texture = SubResource("AtlasTexture_h72da")
Expand Down Expand Up @@ -214,11 +215,14 @@ volume = -15.0
[connection signal="card_tooltip_changed" from="." to="CardContentGroup/CardNameBackground/CardName" method="set_tooltip"]
[connection signal="deck_changed" from="." to="CardContentGroup/DropShadow" method="deck_changed"]
[connection signal="deck_changed" from="." to="CardBack" method="deck_changed"]
[connection signal="focus_changed" from="." to="CardContentGroup/DropShadow" method="focus_changed"]
[connection signal="focus_changed" from="." to="CardBack" method="focus_changed"]
[connection signal="hide_card" from="." to="CardContentGroup/CardBackground" method="hide"]
[connection signal="hide_card" from="." to="CardContentGroup/CardNameBackground/CardName" method="card_hidden"]
[connection signal="hide_card" from="." to="CardBack" method="toggle_on"]
[connection signal="remove_requested" from="." to="CardBack" method="removal_planed"]
[connection signal="show_card" from="." to="CardContentGroup" method="show_card_content"]
[connection signal="show_card" from="." to="CardContentGroup/CardBackground" method="show"]
[connection signal="show_card" from="." to="CardBack" method="toggle_off"]
[connection signal="ready_for_destruction" from="CardContentGroup" to="." method="destory_now"]
[connection signal="fully_hidden" from="CardBack" to="." method="signal_repeater_fully_hidden"]
Expand Down
7 changes: 2 additions & 5 deletions entities/game/card_template/scripts/CardDropShadow.gd
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ func deck_changed(deck: MemoryDeckResource) -> void:
if deck.card_back != null:
texture = deck.card_back

func got_focus() -> void:
_animate_shadow(true)

func lost_focus() -> void:
_animate_shadow(false)
func focus_changed(new_state: bool) -> void:
_animate_shadow(new_state)

func _animate_shadow(animate_in: bool) -> void:
if animate_in:
Expand Down
Loading