Fade flicker fix attempt #1

This commit is contained in:
Alice Gaudon 2020-08-20 19:40:24 +02:00
parent bab3cb36d6
commit 9a3c5458b6
4 changed files with 13 additions and 10 deletions

View File

@ -24,7 +24,7 @@ func show_press(action : String):
play('default')
show()
func _input(event):
func _input(_event):
last_is_joy = false
for b in [
JOY_XBOX_A,

View File

@ -10,8 +10,8 @@ onready var name_label = get_node(name_label_path) as RichTextLabel
export (NodePath) var text_label_path
onready var text_label = get_node(text_label_path) as RichTextLabel
export (NodePath) var expression_node_path
onready var expression_node = get_node(expression_node_path) as RichTextLabel
#export (NodePath) var expression_node_path
#onready var expression_node = get_node(expression_node_path) as RichTextLabel
onready var music_player = get_node('/root/MusicPlayer') as MusicPlayer
@ -36,11 +36,11 @@ func _ready():
$MarginContainer.hide()
func start_dialogue(dialog_path : String) -> DialogueAction:
var dialogue = DialogueAction.new()
dialogue.dialogue_file_path = dialog_path
dialogue.dialogue_box = self
dialogue.start()
return dialogue
var action = DialogueAction.new()
action.dialogue_file_path = dialog_path
action.dialogue_box = self
action.start()
return action
func start(_dialogue : Array):
dialogue = _dialogue
@ -113,8 +113,11 @@ func update() -> void:
var animation = line.get('animation', null)
if animation != null:
print('animate!' + animation)
if animation == 'fadein':
black_screen.modulate.a = 1
black_screen.animate(animation, timer)
elif expression == 'black':
black_screen.modulate.a = 1
black_screen.animate('black', 0)
else:
black_screen.animate(null, timer)

View File

@ -169,7 +169,7 @@ func move():
move_left()
trying_to_move = false
func _process(delta):
func _process(_delta):
interact()
move()

View File

@ -41,7 +41,7 @@ func _input(event):
dir = Vector2(x, y)
func _process(delta):
func _process(_delta):
if linear_velocity.length_squared() < 1:
$Sprite.play('default')
elif linear_velocity.x > 0: