162 lines
4.9 KiB
Plaintext
162 lines
4.9 KiB
Plaintext
[gd_scene load_steps=16 format=3 uid="uid://bq1odbf3aipjg"]
|
|
|
|
[ext_resource type="Script" uid="uid://dlsggvm2k67kh" path="res://scripts/player.gd" id="1_3vyb7"]
|
|
[ext_resource type="Texture2D" uid="uid://bjs3op5jofojm" path="res://assets/Textures/CowboyMain.png" id="2_qhqgy"]
|
|
[ext_resource type="Texture2D" uid="uid://ckw8npwiqciqe" path="res://assets/Textures/Gun.png" id="3_dqkch"]
|
|
[ext_resource type="AudioStream" uid="uid://bepk2tr7ahqrs" path="res://assets/Sfx/086409_retro-gun-shot-81545.mp3" id="4_dqkch"]
|
|
[ext_resource type="Texture2D" uid="uid://lpxchvf7lpl6" path="res://assets/Textures/ShotFlare.png" id="5_qlg0r"]
|
|
[ext_resource type="AudioStream" uid="uid://bt8cj5mfwwids" path="res://assets/Sfx/clean-revolver-reload-6889.mp3" id="6_tuyoq"]
|
|
[ext_resource type="AudioStream" uid="uid://rgdm55v4k4ut" path="res://assets/Sfx/empty-gun-shot-6209.mp3" id="7_fjrip"]
|
|
|
|
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_qhqgy"]
|
|
radius = 36.0
|
|
height = 124.0
|
|
|
|
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_dqkch"]
|
|
radius = 36.0
|
|
height = 124.0
|
|
|
|
[sub_resource type="Animation" id="Animation_tuyoq"]
|
|
length = 0.001
|
|
tracks/0/type = "value"
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/path = NodePath("ShotFlare:modulate")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/keys = {
|
|
"times": PackedFloat32Array(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"update": 0,
|
|
"values": [Color(1, 1, 1, 0)]
|
|
}
|
|
|
|
[sub_resource type="Animation" id="Animation_qlg0r"]
|
|
resource_name = "shot_flare"
|
|
length = 0.2
|
|
tracks/0/type = "value"
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/path = NodePath("ShotFlare:modulate")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/keys = {
|
|
"times": PackedFloat32Array(0, 0.0102053, 0.2),
|
|
"transitions": PackedFloat32Array(1, 1, 1),
|
|
"update": 0,
|
|
"values": [Color(1, 1, 1, 0), Color(1, 0.945098, 0, 1), Color(1, 1, 1, 0)]
|
|
}
|
|
|
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_fjrip"]
|
|
_data = {
|
|
&"RESET": SubResource("Animation_tuyoq"),
|
|
&"shot_flare": SubResource("Animation_qlg0r")
|
|
}
|
|
|
|
[sub_resource type="Animation" id="Animation_fjrip"]
|
|
resource_name = "Hurt"
|
|
length = 0.3
|
|
tracks/0/type = "value"
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/path = NodePath("Body:modulate")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/keys = {
|
|
"times": PackedFloat32Array(0, 0.3),
|
|
"transitions": PackedFloat32Array(1, 1),
|
|
"update": 0,
|
|
"values": [Color(1, 0, 0, 1), Color(1, 1, 1, 1)]
|
|
}
|
|
|
|
[sub_resource type="Animation" id="Animation_smehm"]
|
|
length = 0.001
|
|
tracks/0/type = "value"
|
|
tracks/0/imported = false
|
|
tracks/0/enabled = true
|
|
tracks/0/path = NodePath("Body:modulate")
|
|
tracks/0/interp = 1
|
|
tracks/0/loop_wrap = true
|
|
tracks/0/keys = {
|
|
"times": PackedFloat32Array(0),
|
|
"transitions": PackedFloat32Array(1),
|
|
"update": 0,
|
|
"values": [Color(1, 1, 1, 1)]
|
|
}
|
|
|
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ur7pv"]
|
|
_data = {
|
|
&"Hurt": SubResource("Animation_fjrip"),
|
|
&"RESET": SubResource("Animation_smehm")
|
|
}
|
|
|
|
[node name="Player" type="CharacterBody2D"]
|
|
collision_layer = 2
|
|
collision_mask = 57
|
|
script = ExtResource("1_3vyb7")
|
|
|
|
[node name="Body" type="Sprite2D" parent="."]
|
|
scale = Vector2(0.2, 0.2)
|
|
texture = ExtResource("2_qhqgy")
|
|
|
|
[node name="Gun" type="Sprite2D" parent="Body"]
|
|
position = Vector2(350, 180)
|
|
rotation = -0.174533
|
|
scale = Vector2(0.344421, 0.531273)
|
|
texture = ExtResource("3_dqkch")
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
position = Vector2(-12, -4)
|
|
shape = SubResource("CapsuleShape2D_qhqgy")
|
|
|
|
[node name="Camera2D" type="Camera2D" parent="."]
|
|
|
|
[node name="HitBox" type="Area2D" parent="."]
|
|
collision_layer = 4
|
|
collision_mask = 72
|
|
|
|
[node name="CollisionShape2D2" type="CollisionShape2D" parent="HitBox"]
|
|
position = Vector2(-12, -4)
|
|
shape = SubResource("CapsuleShape2D_dqkch")
|
|
debug_color = Color(0.965523, 0.158914, 0.253109, 0.42)
|
|
|
|
[node name="CameraRemoteTransform" type="RemoteTransform2D" parent="."]
|
|
|
|
[node name="ShootRaycast" type="RayCast2D" parent="."]
|
|
position = Vector2(26, 1)
|
|
target_position = Vector2(700, 0)
|
|
collision_mask = 9
|
|
collide_with_areas = true
|
|
|
|
[node name="ShotFlare" type="Sprite2D" parent="."]
|
|
modulate = Color(1, 1, 1, 0)
|
|
position = Vector2(100, 31)
|
|
rotation = -0.191986
|
|
scale = Vector2(0.124247, 0.0768767)
|
|
texture = ExtResource("5_qlg0r")
|
|
|
|
[node name="ShootSound" type="AudioStreamPlayer2D" parent="."]
|
|
stream = ExtResource("4_dqkch")
|
|
|
|
[node name="ReloadSound" type="AudioStreamPlayer2D" parent="."]
|
|
stream = ExtResource("6_tuyoq")
|
|
|
|
[node name="EmptyGunSound" type="AudioStreamPlayer2D" parent="."]
|
|
stream = ExtResource("7_fjrip")
|
|
|
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
|
libraries = {
|
|
&"": SubResource("AnimationLibrary_fjrip")
|
|
}
|
|
|
|
[node name="ReloadTimer" type="Timer" parent="."]
|
|
wait_time = 3.0
|
|
one_shot = true
|
|
|
|
[node name="AnimationPlayerHurt" type="AnimationPlayer" parent="."]
|
|
libraries = {
|
|
&"": SubResource("AnimationLibrary_ur7pv")
|
|
}
|
|
|
|
[connection signal="body_entered" from="HitBox" to="." method="_on_hit_box_body_entered"]
|