Skip to content

Commit

Permalink
Fix instancing new Character Nodes on Simple Highlight Portrait.
Browse files Browse the repository at this point in the history
This portrait is simple and allows for only one image, there is no underlying node hierarchy that may need to change.
Therefore, we need to ensure to not recreate a new character node.
  • Loading branch information
CakeVR authored Nov 21, 2024
1 parent b9a9a20 commit 24e654b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ func _ready() -> void:
self.modulate = unhighlighted_color


func _should_do_portrait_update(_character: DialogicCharacter, _portrait: String) -> bool:
return true


func _highlight() -> void:
create_tween().tween_property(self, 'modulate', Color.WHITE, 0.15)
_prev_z_index = DialogicUtil.autoload().Portraits.get_character_info(character).get('z_index', 0)
Expand Down

0 comments on commit 24e654b

Please sign in to comment.