[gd_scene load_steps=7 format=2]

[ext_resource path="res://assets/contraption/PixelPortal.png" type="Texture" id=1]
[ext_resource path="res://src/Contraptions/Portal/Portal.gd" type="Script" id=2]

[sub_resource type="CapsuleShape2D" id=1]
radius = 40.0
height = 22.4675

[sub_resource type="Animation" id=2]
resource_name = "Start"
tracks/0/type = "value"
tracks/0/path = NodePath("TransitionLayer/ColorRect:color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 0,
"values": [ Color( 0, 0, 0, 0 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("TransitionLayer/ColorRect:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ false ]
}

[sub_resource type="Animation" id=4]
resource_name = "activatePortal"
length = 2.0
tracks/0/type = "value"
tracks/0/path = NodePath("portal:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.7, 1.3, 1.8 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 1,
"values": [ 3, 2, 1, 0 ]
}

[sub_resource type="Animation" id=3]
resource_name = "fade_in"
tracks/0/type = "value"
tracks/0/path = NodePath("TransitionLayer/ColorRect:color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 1 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Color( 0, 0, 0, 0 ), Color( 0, 0, 0, 1 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("TransitionLayer/ColorRect:visible")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0 ),
"transitions": PoolRealArray( 1 ),
"update": 1,
"values": [ true ]
}

[node name="Portal" type="Area2D"]
pause_mode = 2
z_index = -1
z_as_relative = false
collision_layer = 0
monitorable = false
script = ExtResource( 2 )
next_scene = "res://src/Levels/Level 1.tscn"

[node name="portal" type="Sprite" parent="."]
texture = ExtResource( 1 )
hframes = 2
vframes = 2
frame = 3

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
scale = Vector2( 0.3, 0.3 )
shape = SubResource( 1 )

[node name="TransitionLayer" type="CanvasLayer" parent="."]
layer = 100

[node name="ColorRect" type="ColorRect" parent="TransitionLayer"]
margin_right = 1024.0
margin_bottom = 600.0
color = Color( 0, 0, 0, 0 )

[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
autoplay = "Start"
anims/Start = SubResource( 2 )
anims/activatePortal = SubResource( 4 )
anims/fade_in = SubResource( 3 )

[connection signal="body_entered" from="." to="." method="_on_body_entered"]
