20 lines
303 B
GDScript
20 lines
303 B
GDScript
extends VideoStreamPlayer
|
|
|
|
@export var end : TextureRect
|
|
var state = 0
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(delta):
|
|
|
|
|
|
if !is_playing() && state == 1:
|
|
end.visible = true
|
|
state = 2
|
|
|
|
if !Voice.playing && state == 0:
|
|
state = 1
|
|
play()
|
|
|
|
|