Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ func consume(coord: Vector2i, immediate: bool = false) -> void:
node.modulate.a = 0.0
else:
var tween := create_tween().set_parallel(true)
for node: Node2D in nodes:
for node: Node2D in nodes.filter(
func(node: Node2D) -> bool: return is_instance_valid(node)
):
tween.tween_property(node, "modulate:a", 0.0, _DURATION).set_ease(Tween.EASE_OUT)
await tween.finished

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# SPDX-FileCopyrightText: The Threadbare Authors
# SPDX-License-Identifier: MPL-2.0
extends Node2D

const LongerHook = preload(
"res://scenes/quests/lore_quests/quest_002/2_grappling_hook/components/longer_hook.gd"
)

@onready var player: Player = %Player
@onready var frame_camera_behavior: FrameCameraBehavior = %FrameCameraBehavior
@onready var void_chasing: CharacterBody2D = %VoidChasing


func _ready() -> void:
frame_camera_behavior.frame_target = player.get_node("PlayerHook/HookEnding")


func _on_button_item_collected() -> void:
LongerHook.grant_longer_hook(player)

# Zoom out the camera when collecting the powerup, because now the player
# can throw a longer thread:
var camera: Camera2D = get_viewport().get_camera_2d()
var zoom_tween := create_tween()
zoom_tween.tween_property(camera, "zoom", Vector2(0.5, 0.5), 1.0)
void_chasing.start(player)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://crgkqdcmp27ee
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ metadata/_edit_group_ = true
position = Vector2(3264, -503)
collision_layer = 4
script = ExtResource("22_rk3po")
next_scene = "uid://doalg4wjntiff"
next_scene = "uid://bcxwhqdqe7m2y"
metadata/_custom_type_script = "uid://hqdquinbimce"

[node name="CollisionShape2D" type="CollisionShape2D" parent="Teleporter"]
Expand Down
Loading