[gd_scene load_steps=21 format=3 uid="uid://dp4eps03igd3w"]

[ext_resource type="Script" path="res://logic-scenes/board/card.gd" id="1_6ceun"]
[ext_resource type="Texture2D" uid="uid://sv0nhkkur1tt" path="res://logic-scenes/board/card-textures/cardsheet.png" id="2_buevv"]
[ext_resource type="Texture2D" uid="uid://kpmk21d8rlso" path="res://logic-scenes/board/particle_textures/star.png" id="3_8wu8j"]
[ext_resource type="Theme" uid="uid://b056fn288p8ha" path="res://logic-scenes/themes/easy-handwriting.theme" id="3_mi4ah"]
[ext_resource type="Texture2D" uid="uid://bqilajx05t0eb" path="res://logic-scenes/board/particle_textures/void_nomotion.png" id="4_jam8u"]

[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_foovg"]
radius = 110.0
height = 336.0

[sub_resource type="AtlasTexture" id="AtlasTexture_ykk13"]
atlas = ExtResource("2_buevv")
region = Rect2(0, 0, 600, 440)

[sub_resource type="AtlasTexture" id="AtlasTexture_l43eo"]
atlas = ExtResource("2_buevv")
region = Rect2(600, 0, 600, 440)

[sub_resource type="AtlasTexture" id="AtlasTexture_x2vcn"]
atlas = ExtResource("2_buevv")
region = Rect2(0, 440, 600, 440)

[sub_resource type="AtlasTexture" id="AtlasTexture_e7401"]
atlas = ExtResource("2_buevv")
region = Rect2(600, 440, 600, 440)

[sub_resource type="AtlasTexture" id="AtlasTexture_j7wh6"]
atlas = ExtResource("2_buevv")
region = Rect2(0, 880, 600, 440)

[sub_resource type="SpriteFrames" id="SpriteFrames_ckivt"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_ykk13")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_l43eo")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_x2vcn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_e7401")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_j7wh6")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]

[sub_resource type="GDScript" id="GDScript_8bs16"]
script/source = "extends AnimatedSprite2D

@onready var particles = $GPUParticles2D
@onready var initial_position = position
var noise_position = randf()
var noise: Noise = FastNoiseLite.new()

func _process(delta):
    
    if not State.reduce_motion:
        
        noise_position += delta * 10
        
        var random_position = Vector2(noise.get_noise_1d(noise_position*2), noise.get_noise_1d(-noise_position))
        
        random_position = random_position.normalized() * pow(random_position.length()*2, 3) * 5
        
        position = initial_position - random_position
        
        rotation = noise.get_noise_1d(noise_position*10) * random_position.length() * 0.01
        
        particles.position = random_position
        
    else: position = initial_position
"

[sub_resource type="Gradient" id="Gradient_v70nd"]
interpolation_mode = 2
offsets = PackedFloat32Array(0, 0.0529197, 0.191606, 1)
colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0.491329, 1, 1, 1, 0)

[sub_resource type="GradientTexture1D" id="GradientTexture1D_xxq8p"]
gradient = SubResource("Gradient_v70nd")

[sub_resource type="Curve" id="Curve_q6cmf"]
_data = [Vector2(0, 0), 0.0, 3.16529, 0, 0, Vector2(0.241056, 0.191336), 0.132446, 0.132446, 0, 0, Vector2(1, 1), 3.94797, 0.0, 0, 0]
point_count = 3

[sub_resource type="CurveTexture" id="CurveTexture_cg0w1"]
curve = SubResource("Curve_q6cmf")

[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_by44l"]
particle_flag_disable_z = true
emission_shape = 6
emission_ring_axis = Vector3(0, 0, 1)
emission_ring_height = 0.0
emission_ring_radius = 180.0
emission_ring_inner_radius = 185.0
spread = 180.0
initial_velocity_min = -10.0
initial_velocity_max = 10.0
angular_velocity_min = -150.0
angular_velocity_max = -150.0
gravity = Vector3(0, 0, 0)
radial_accel_min = -20.0
radial_accel_max = -5.0
tangential_accel_min = 20.0
tangential_accel_max = 30.0
attractor_interaction_enabled = false
scale_min = 3.0
scale_max = 5.0
scale_curve = SubResource("CurveTexture_cg0w1")
color_ramp = SubResource("GradientTexture1D_xxq8p")
turbulence_noise_strength = 0.1

[sub_resource type="GDScript" id="GDScript_vjwk7"]
script/source = "extends GPUParticles2D

func _process(_delta):
    self.visible = !State.reduce_motion
"

[sub_resource type="GDScript" id="GDScript_tgc0b"]
script/source = "extends Sprite2D

func _process(_delta):
    self.visible = State.reduce_motion
"

[node name="card" type="Area2D"]
script = ExtResource("1_6ceun")
metadata/type = "card"

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(-0.0713516, 0.997451)
rotation = 1.5708
shape = SubResource("CapsuleShape2D_foovg")

[node name="BackgroundSprite" type="AnimatedSprite2D" parent="."]
clip_children = 2
scale = Vector2(0.6, 0.6)
sprite_frames = SubResource("SpriteFrames_ckivt")
frame = 1
script = SubResource("GDScript_8bs16")

[node name="GPUParticles2D" type="GPUParticles2D" parent="BackgroundSprite"]
amount = 500
process_material = SubResource("ParticleProcessMaterial_by44l")
texture = ExtResource("3_8wu8j")
lifetime = 2.5
speed_scale = 1.3
explosiveness = 0.2
randomness = 0.14
local_coords = true
script = SubResource("GDScript_vjwk7")

[node name="Sprite2D" type="Sprite2D" parent="BackgroundSprite"]
visible = false
scale = Vector2(0.4, 0.4)
texture = ExtResource("4_jam8u")
script = SubResource("GDScript_tgc0b")

[node name="Label" type="Label" parent="."]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -127.0
offset_top = -82.5
offset_right = 127.0
offset_bottom = 82.5
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("3_mi4ah")
theme_type_variation = &"card_text"
autowrap_mode = 3

[node name="sticky note anchor" type="Node2D" parent="."]
position = Vector2(-65.6478, 60.3852)

[connection signal="input_event" from="." to="." method="_on_input_event"]
[connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"]
[connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"]
