Animations & Movement tweaks

This commit is contained in:
2020-05-17 20:48:11 -04:00
parent abe340f025
commit 6fd53367c0
27 changed files with 2480 additions and 1378 deletions

View File

@ -7,7 +7,8 @@ func _ready():
$Speaker.speaker_name = "Aura"
connect("body_entered", self, "_on_body_enter")
connect("body_exited", self, "_on_body_exit")
#$Speaker.connect("dialog_exited", self, "_next")
$AnimationPlayer.play("Idle")
$AnimationPlayer.seek(rand_range(0.0,2.0))
func _on_body_enter(body):
if body.has_method("add_interactable"):
@ -16,7 +17,7 @@ func _on_body_enter(body):
func _process(delta):
if state == 1 and not $Speaker.gui.is_in_dialog():
$Sprite.frame = 0
$AnimationPlayer.play("Shoot")
$Speaker.start_dialog("aura_meeting_gun")
state = 2
elif state == 2 and not $Speaker.gui.is_in_dialog():

View File

@ -7,8 +7,11 @@ func _ready():
$Speaker.speaker_name = "CEO Grant Blevins"
$Speaker.speaker = "ceo"
$Speaker.connect("dialog_exited", self, "_on_dialog_exit")
$AnimationPlayer.play("Idle")
$AnimationPlayer.seek(rand_range(0.0, 2.0), true)
func _on_interact():
$Torso.flip_h = global_position.x < player.global_position.x
if state == 0:
$Speaker.start_dialog("intro_meet_ceo")
if player:

View File

@ -4,6 +4,8 @@ export var start_on_play = true
func _ready():
connect("interacted", self, "_on_interact")
$AnimationPlayer.play("Idle")
$AnimationPlayer.seek(rand_range(0.0, 2.0), true)
$Speaker.speaker = "fast_talker"
$Speaker.speaker_name = "Dr.Thadd"
$Speaker.connect("dialog_exited", self, "give_tip")
@ -12,6 +14,7 @@ func _ready():
func _on_interact():
$Speaker.start_dialog("intro_science_followup")
$Torso.flip_h = global_position.x < player.global_position.x
func give_tip():
$Speaker.gui.display_tip("Used A & D to move\nleft and right")