Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/last_commit_imake' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Matx1002 committed Jul 21, 2024
2 parents 8548905 + dc1fd54 commit b52a0b9
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions Assets/Dialogue/2Level/train_leaves_later.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(Damn, I won't do it now. The train leaves later. I'll head back to safeplace)
5 changes: 4 additions & 1 deletion Scenes/Levels/2Level.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ position = Vector2(4929.92, 2376)
scale = Vector2(2.25118, 1.657)

[node name="NextLevel" type="Area2D" parent="."]
position = Vector2(8552, 1882)
z_index = 10
position = Vector2(8553, 1882)
collision_mask = 3
script = ExtResource("13_po3h5")

Expand Down Expand Up @@ -281,3 +282,5 @@ offset_bottom = 95.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("15_v3gg5")

[connection signal="body_entered" from="NextLevel" to="." method="_on_next_level_body_entered"]
2 changes: 2 additions & 0 deletions Scenes/Levels/Area2D.gd
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ func _process(delta):

func _on_body_entered(body):
if body.is_in_group("player"):
GlobalVariables.PLAYER_CONTROLS_ENABLED = false
TextboxNarrative.dialogue_begin("res://Assets/Dialogue/2Level/train_leaves_later.txt")
GlobalVariables.LEVEL_TO_CHANGE = 0;
pass # Replace with function body.
3 changes: 3 additions & 0 deletions Scenes/NPC/old_man_npc.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ libraries = {

[node name="AnimationTree" type="AnimationTree" parent="."]
active = false
libraries = {
"": SubResource("AnimationLibrary_ha7mj")
}
tree_root = SubResource("AnimationNodeStateMachine_mk6du")
anim_player = NodePath("../AnimationPlayer")
parameters/conditions/death = false
Expand Down
10 changes: 10 additions & 0 deletions Scripts/Levels/2Level.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,18 @@ extends Node2D
# Called when the node enters the scene tree for the first time.
func _ready():
SoundtrackPlayer.play_soundtrack(SOUNDTRACKPLAYER_CLASS.THEMES.UNDERGROUND)
TextboxNarrative.dialogue_finished.connect(_on_dialogue_finished)


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass


func _on_next_level_body_entered(body):
if body.is_in_group("player"):
GlobalVariables.PLAYER_CONTROLS_ENABLED = false
TextboxNarrative.dialogue_begin("res://Assets/Dialogue/2Level/train_leaves_later.txt")

func _on_dialogue_finished():
GlobalVariables.LEVEL_TO_CHANGE = 0;
2 changes: 1 addition & 1 deletion Scripts/NPC/old_man.gd
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ func kill():
is_dead = true
$BloodSplatter.emitting = true
emit_signal("old_man_killed")
GlobalVariables.IS_MILITIA_TRIGGERED = true
GlobalVariables.IS_MILITIA_TRIGGERED = true

0 comments on commit b52a0b9

Please sign in to comment.