Add addons
This commit is contained in:
parent
2c862b2235
commit
3367bad24f
527 changed files with 36197 additions and 0 deletions
|
|
@ -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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue