[gd_scene load_steps=11 format=3 uid="uid://d1w8ftfhxycfy"]

[ext_resource type="Script" uid="uid://bhexx6mj1xv3q" path="res://addons/phantom_camera/scripts/phantom_camera/phantom_camera_2d.gd" id="1_llsih"]
[ext_resource type="Script" uid="uid://bhd4nuiu23e7l" path="res://addons/phantom_camera/scripts/phantom_camera/phantom_camera_noise_emitter_2d.gd" id="3_0bl5s"]
[ext_resource type="Script" uid="uid://8umksf8e80fw" path="res://addons/phantom_camera/scripts/resources/tween_resource.gd" id="3_fixiw"]
[ext_resource type="Script" uid="uid://dimvdouy8g0sv" path="res://addons/phantom_camera/scripts/resources/phantom_camera_noise_2d.gd" id="6_ctkin"]

[sub_resource type="GDScript" id="GDScript_fixiw"]
script/source = "class_name GlobalCamera extends Node2D

@onready var phantom_camera_2d: PhantomCamera2D = %PhantomCamera2D

@onready var _0_hook_touch_noise: PhantomCameraNoiseEmitter2D = %\"0_Hook_Touch_Noise\"
@onready var _45_hook_touch_noise: PhantomCameraNoiseEmitter2D = %\"45_Hook_Touch_Noise\"
@onready var _90_hook_touch_noise: PhantomCameraNoiseEmitter2D = %\"90_Hook_Touch_Noise\"
@onready var _135_hook_touch_noise: PhantomCameraNoiseEmitter2D = %\"135_Hook_Touch_Noise\"


func emit_camera_shock(noise: PhantomCameraNoise2D) -> void:
	if not noise:
		return

func emit_hook_touch_shock(dir : int) -> void:
	match dir:
		0:
			_0_hook_touch_noise.emit()
		1:
			_45_hook_touch_noise.emit()
		2:
			_90_hook_touch_noise.emit()
		3:
			_135_hook_touch_noise.emit()
"

[sub_resource type="Resource" id="Resource_pvk7k"]
script = ExtResource("3_fixiw")

[sub_resource type="Resource" id="Resource_jjeqj"]
script = ExtResource("6_ctkin")
amplitude = 5.0
frequency = 18.0
randomize_noise_seed = 1
noise_seed = 1000
positional_multiplier_x = 0.0
positional_multiplier_y = 2.0
metadata/_custom_type_script = "uid://dimvdouy8g0sv"

[sub_resource type="Resource" id="Resource_ctkin"]
script = ExtResource("6_ctkin")
amplitude = 5.0
frequency = 18.0
randomize_noise_seed = 1
metadata/_custom_type_script = "uid://dimvdouy8g0sv"

[sub_resource type="Resource" id="Resource_wjs5j"]
script = ExtResource("6_ctkin")
amplitude = 5.0
frequency = 18.0
randomize_noise_seed = 1
positional_multiplier_x = 2.0
positional_multiplier_y = 0.0
metadata/_custom_type_script = "uid://dimvdouy8g0sv"

[sub_resource type="Resource" id="Resource_ompnq"]
script = ExtResource("6_ctkin")
amplitude = 5.0
frequency = 18.0
randomize_noise_seed = 1
metadata/_custom_type_script = "uid://dimvdouy8g0sv"

[node name="PlayerStaticCamera" type="Node2D"]
script = SubResource("GDScript_fixiw")

[node name="PhantomCamera2D" type="Node2D" parent="."]
unique_name_in_owner = true
script = ExtResource("1_llsih")
priority = 1000
zoom = Vector2(0.8, 0.8)
tween_resource = SubResource("Resource_pvk7k")
tween_on_load = false
draw_limits = true
noise_emitter_layer = 1
metadata/_custom_type_script = "uid://bhexx6mj1xv3q"

[node name="0_Hook_Touch_Noise" type="Node2D" parent="PhantomCamera2D"]
unique_name_in_owner = true
script = ExtResource("3_0bl5s")
noise = SubResource("Resource_jjeqj")
growth_time = 0.04095982
duration = 0.16
decay_time = 0.10085586
metadata/_custom_type_script = "uid://bhd4nuiu23e7l"

[node name="45_Hook_Touch_Noise" type="Node2D" parent="PhantomCamera2D"]
unique_name_in_owner = true
script = ExtResource("3_0bl5s")
noise = SubResource("Resource_ctkin")
growth_time = 0.04096021
duration = 0.16
decay_time = 0.10085552
metadata/_custom_type_script = "uid://bhd4nuiu23e7l"

[node name="90_Hook_Touch_Noise" type="Node2D" parent="PhantomCamera2D"]
unique_name_in_owner = true
script = ExtResource("3_0bl5s")
noise = SubResource("Resource_wjs5j")
growth_time = 0.0409602
duration = 0.16
decay_time = 0.10085564
metadata/_custom_type_script = "uid://bhd4nuiu23e7l"

[node name="135_Hook_Touch_Noise" type="Node2D" parent="PhantomCamera2D"]
unique_name_in_owner = true
script = ExtResource("3_0bl5s")
noise = SubResource("Resource_ompnq")
growth_time = 0.040960066
duration = 0.16
decay_time = 0.100856625
metadata/_custom_type_script = "uid://bhd4nuiu23e7l"
