Browse Source

Fade flicker fix attempt #1

a
Alice Gaudon 11 months ago
parent
commit
9a3c5458b6
  1. 2
      scripts/ControlIndicator.gd
  2. 17
      scripts/DialogueBox.gd
  3. 2
      scripts/game1/Game1Script.gd
  4. 2
      scripts/game1/PlayerController.gd

2
scripts/ControlIndicator.gd

@ -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,

17
scripts/DialogueBox.gd

@ -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)

2
scripts/game1/Game1Script.gd

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

2
scripts/game1/PlayerController.gd

@ -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:

Loading…
Cancel
Save