Skip to content

Commit

Permalink
Fix instancing new Character Nodes on Simple Highlight Portrait. (#2486)
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 22, 2024
1 parent b9a9a20 commit 7e38e1d
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 7e38e1d

Please sign in to comment.