Vast improvements and a working finite state machine, working on new guild member registration.
This commit is contained in:
27
update_bubble.gd
Normal file
27
update_bubble.gd
Normal file
@@ -0,0 +1,27 @@
|
||||
extends NinePatchRect
|
||||
|
||||
@onready var label : Label = %Label
|
||||
@onready var timer : Timer = %Timer
|
||||
|
||||
func _ready() -> void:
|
||||
show_message("TESTING, 1 2 3\nTESTING!!!!")
|
||||
|
||||
|
||||
func show_message(msg : String, show_time : float = 1.0) -> void:
|
||||
label.text = msg
|
||||
appear.call(show_time)
|
||||
|
||||
func appear(show_time : float):
|
||||
var size : Vector2 = label.get_size()
|
||||
size += get_minimum_size() / 2
|
||||
print(size)
|
||||
var tween = create_tween()
|
||||
tween.tween_property(self, "size", size, .25)
|
||||
#tween.parallel().tween_property(self, "pivot_offset", Vector2(0, size.y), .5)
|
||||
tween.parallel().tween_property(self, "position", Vector2(position.x, position.y-size.y/2), 0.25)
|
||||
timer.start(show_time + .25)
|
||||
|
||||
func _on_timer_timeout() -> void:
|
||||
var tween = create_tween()
|
||||
tween.tween_property(self, "modulate", Color(1,1,1,0), .5)
|
||||
tween.tween_callback(queue_free)
|
||||
Reference in New Issue
Block a user