闪烁时间调整
This commit is contained in:
parent
3ea7f0eeb9
commit
5014b40625
@ -5,6 +5,8 @@ extends BaseControl
|
||||
#用来播放动画的tween
|
||||
var animation_tween
|
||||
|
||||
##闪烁时间间隔
|
||||
@export var flicker_time:float=0.2
|
||||
func _ready() -> void:
|
||||
super._ready()
|
||||
self.button_down.connect(_on_button_down)
|
||||
@ -32,11 +34,11 @@ var is_select:bool:
|
||||
if animation_tween!=null:
|
||||
animation_tween.kill()
|
||||
animation_tween=create_tween()
|
||||
animation_tween.tween_callback(set_texture.bind(TexturePressed)).set_delay(0.15)
|
||||
animation_tween.tween_callback(set_texture.bind(TextureNormal)).set_delay(0.15)
|
||||
animation_tween.tween_callback(set_texture.bind(TexturePressed)).set_delay(0.15)
|
||||
animation_tween.tween_callback(set_texture.bind(TextureNormal)).set_delay(0.15)
|
||||
animation_tween.tween_callback(set_texture.bind(TexturePressed)).set_delay(0.15)
|
||||
animation_tween.tween_callback(set_texture.bind(TexturePressed)).set_delay(flicker_time)
|
||||
animation_tween.tween_callback(set_texture.bind(TextureNormal)).set_delay(flicker_time)
|
||||
animation_tween.tween_callback(set_texture.bind(TexturePressed)).set_delay(flicker_time)
|
||||
animation_tween.tween_callback(set_texture.bind(TextureNormal)).set_delay(flicker_time)
|
||||
animation_tween.tween_callback(set_texture.bind(TexturePressed)).set_delay(flicker_time)
|
||||
else:
|
||||
if animation_tween!=null:
|
||||
animation_tween.kill()
|
||||
|
Loading…
Reference in New Issue
Block a user