[gd_scene load_steps=22 format=2]

[ext_resource path="res://src/Actors/Player.gd" type="Script" id=1]
[ext_resource path="res://assets/art/player/player.png" type="Texture" id=2]
[ext_resource path="res://assets/audio/sfx/jump.wav" type="AudioStream" id=3]
[ext_resource path="res://assets/audio/sfx/pick.wav" type="AudioStream" id=4]
[ext_resource path="res://assets/art/ui/touch_button_left.png" type="Texture" id=5]
[ext_resource path="res://assets/art/ui/touch_button_right.png" type="Texture" id=6]
[ext_resource path="res://assets/art/ui/touch_button_jump.png" type="Texture" id=7]
[ext_resource path="res://assets/art/ui/touch_button_fire.png" type="Texture" id=8]
[ext_resource path="res://src/Actors/Gun.gd" type="Script" id=9]
[ext_resource path="res://assets/audio/sfx/pick2.wav" type="AudioStream" id=10]

[sub_resource type="Animation" id=1]
resource_name = "crouch"
length = 0.01
loop = true
step = 0.25

[sub_resource type="Animation" id=2]
resource_name = "falling"
length = 0.01
loop = true
step = 0.25

[sub_resource type="Animation" id=3]
resource_name = "falling_weapon"
length = 0.5
loop = true
step = 0.25

[sub_resource type="Animation" id=4]
length = 7.0
loop = true
step = 0.25
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
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": 1,
"values": [ 0 ]
}

[sub_resource type="Animation" id=5]
length = 0.5
loop = true
step = 0.25

[sub_resource type="Animation" id=6]
length = 1.5
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite: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.2, 0.6, 1 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 1,
"values": [ 0, 1, 2, 0 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("Jump:playing")
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 ]
}

[sub_resource type="Animation" id=7]
length = 0.5
loop = true
step = 0.25

[sub_resource type="Animation" id=8]
length = 4.001
loop = true
step = 0.5
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame_coords")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1 ),
"update": 0,
"values": [ Vector2( 0, 0 ), Vector2( 0, 1 ), Vector2( 1, 1 ), Vector2( 2, 1 ), Vector2( 3, 1 ), Vector2( 0, 2 ), Vector2( 1, 2 ), Vector2( 2, 2 ) ]
}

[sub_resource type="Animation" id=9]
length = 1.25
loop = true
step = 0.25

[sub_resource type="Animation" id=10]
length = 1.25
loop = true
step = 0.25

[sub_resource type="CapsuleShape2D" id=11]
radius = 11.9835
height = 35.6255

[node name="Player" type="KinematicBody2D"]
collision_mask = 30
script = ExtResource( 1 )

[node name="ShootAnimation" type="Timer" parent="."]
process_mode = 0
wait_time = 0.2
one_shot = true

[node name="PlatformDetector" type="RayCast2D" parent="."]
enabled = true
cast_to = Vector2( 0, 6 )
collision_mask = 8

[node name="PlatformDetector2" type="RayCast2D" parent="."]
position = Vector2( -8, 0 )
enabled = true
cast_to = Vector2( 0, 6 )
collision_mask = 8

[node name="PlatformDetector3" type="RayCast2D" parent="."]
position = Vector2( 8, 0 )
enabled = true
cast_to = Vector2( 0, 6 )
collision_mask = 8

[node name="Sprite" type="Sprite" parent="."]
position = Vector2( 0, -40 )
scale = Vector2( 0.16, 0.16 )
texture = ExtResource( 2 )
hframes = 4
vframes = 3
frame = 2

[node name="Gun" type="Position2D" parent="Sprite"]
position = Vector2( 14, 1 )
script = ExtResource( 9 )

[node name="Shoot" type="AudioStreamPlayer2D" parent="Sprite/Gun"]
position = Vector2( -30.6589, -6.13176 )
stream = ExtResource( 4 )

[node name="Shoot2" type="AudioStreamPlayer2D" parent="Sprite/Gun"]
position = Vector2( -30.6589, -6.13176 )
stream = ExtResource( 10 )

[node name="Cooldown" type="Timer" parent="Sprite/Gun"]
process_mode = 0
wait_time = 0.3
one_shot = true

[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
playback_speed = 2.6
anims/crouch = SubResource( 1 )
anims/falling = SubResource( 2 )
anims/falling_weapon = SubResource( 3 )
anims/idle = SubResource( 4 )
anims/idle_weapon = SubResource( 5 )
anims/jumping = SubResource( 6 )
anims/jumping_weapon = SubResource( 7 )
anims/run = SubResource( 8 )
anims/run_weapon = SubResource( 9 )
anims/standing_weapon_ready = SubResource( 10 )

[node name="Camera" type="Camera2D" parent="."]
position = Vector2( 0, -28 )
current = true
zoom = Vector2( 0.5, 0.5 )
process_mode = 0

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( 0, -29.0045 )
shape = SubResource( 11 )

[node name="Jump" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource( 3 )
volume_db = -20.26

[node name="UI" type="CanvasLayer" parent="."]
layer = 0

[node name="Left" type="TouchScreenButton" parent="UI"]
position = Vector2( 27.7593, 360.87 )
scale = Vector2( 1.49157, 1.46265 )
normal = ExtResource( 5 )
passby_press = true
action = "move_left"
visibility_mode = 1

[node name="Right" type="TouchScreenButton" parent="UI"]
position = Vector2( 121.542, 361.415 )
scale = Vector2( 1.49157, 1.46265 )
normal = ExtResource( 6 )
passby_press = true
action = "move_right"
visibility_mode = 1

[node name="Jump" type="TouchScreenButton" parent="UI"]
position = Vector2( 666.224, 359.02 )
scale = Vector2( 1.49157, 1.46265 )
normal = ExtResource( 7 )
action = "jump"
visibility_mode = 1

[node name="Fire" type="TouchScreenButton" parent="UI"]
position = Vector2( 668.073, 262.788 )
scale = Vector2( 1.49157, 1.46265 )
normal = ExtResource( 8 )
action = "shoot"
visibility_mode = 1
