Add addons

This commit is contained in:
Joey Yakimowich-Payne 2023-01-03 16:53:53 -07:00
commit 3367bad24f
No known key found for this signature in database
GPG key ID: 6BFE655FA5ABD1E1
527 changed files with 36197 additions and 0 deletions

View file

@ -0,0 +1,17 @@
@tool
extends Node2D
# If the custom portrait accepts a change, then accept it here
func _update_portrait(passed_character:DialogicCharacter, passed_portrait:String) -> void:
if passed_portrait == "":
passed_portrait = passed_character['default_portrait']
if $Sprite.frames.has_animation(passed_portrait):
$Sprite.play(passed_portrait)
func _on_animated_sprite_2d_animation_finished():
$Sprite.frame = randi()%$Sprite.frames.get_frame_count($Sprite.animation)
$Sprite.play()
func _get_covered_rect() -> Rect2:
return Rect2($Sprite.position, $Sprite.frames.get_frame($Sprite.animation, 0).get_size()*$Sprite.scale)