2025-01-22 11:35:37 +01:00
|
|
|
[gd_scene load_steps=27 format=3 uid="uid://bghghp5ep4w2j"]
|
2024-02-27 17:16:55 +01:00
|
|
|
|
|
|
|
|
[ext_resource type="Script" path="res://Scripts/PlayerMovement.cs" id="1_m27vu"]
|
|
|
|
|
[ext_resource type="Texture2D" uid="uid://la06powu57hu" path="res://Sprites/Cirno_Big.png" id="2_bwf6x"]
|
2025-01-21 15:17:26 +01:00
|
|
|
[ext_resource type="PackedScene" uid="uid://b1qnfiuokpvsr" path="res://Scenes/Weapons/bullet.tscn" id="2_ov36d"]
|
2024-06-09 18:19:57 +02:00
|
|
|
[ext_resource type="PackedScene" uid="uid://chkpk7erlqajg" path="res://Scenes/Selector.tscn" id="3_8wt6s"]
|
2024-03-04 08:25:41 +01:00
|
|
|
[ext_resource type="Script" path="res://addons/smoothing/smoothing_2d.gd" id="4_j4xhu"]
|
2025-01-21 15:17:26 +01:00
|
|
|
[ext_resource type="PackedScene" uid="uid://cfb3nsay84xdb" path="res://Scenes/Weapons/crosshair.tscn" id="6_l43rf"]
|
2024-06-09 18:19:57 +02:00
|
|
|
[ext_resource type="Script" path="res://Scenes/InteractionController.cs" id="7_uvgjg"]
|
2024-11-15 16:32:26 +01:00
|
|
|
[ext_resource type="PackedScene" uid="uid://crry0rgk7a8sm" path="res://Scenes/Weapons/BaseWeapon.tscn" id="9_wblq0"]
|
2024-03-04 08:25:41 +01:00
|
|
|
|
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ai4rh"]
|
2024-06-09 00:56:25 +02:00
|
|
|
size = Vector2(6, 6)
|
2024-02-27 17:16:55 +01:00
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_omx2u"]
|
|
|
|
|
atlas = ExtResource("2_bwf6x")
|
|
|
|
|
region = Rect2(0, 0, 8, 16)
|
|
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_pdst4"]
|
|
|
|
|
atlas = ExtResource("2_bwf6x")
|
|
|
|
|
region = Rect2(0, 0, 8, 16)
|
|
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_s7dqe"]
|
|
|
|
|
atlas = ExtResource("2_bwf6x")
|
|
|
|
|
region = Rect2(0, 0, 8, 16)
|
|
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_irmjj"]
|
|
|
|
|
atlas = ExtResource("2_bwf6x")
|
|
|
|
|
region = Rect2(8, 0, 8, 16)
|
|
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_chuua"]
|
|
|
|
|
atlas = ExtResource("2_bwf6x")
|
|
|
|
|
region = Rect2(16, 0, 8, 16)
|
|
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_nhxfa"]
|
|
|
|
|
atlas = ExtResource("2_bwf6x")
|
|
|
|
|
region = Rect2(0, 32, 8, 16)
|
|
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_tnyrl"]
|
|
|
|
|
atlas = ExtResource("2_bwf6x")
|
|
|
|
|
region = Rect2(8, 32, 8, 16)
|
|
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_awe4i"]
|
|
|
|
|
atlas = ExtResource("2_bwf6x")
|
|
|
|
|
region = Rect2(16, 32, 8, 16)
|
|
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_n0dww"]
|
|
|
|
|
atlas = ExtResource("2_bwf6x")
|
|
|
|
|
region = Rect2(0, 48, 8, 16)
|
|
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_pq4ul"]
|
|
|
|
|
atlas = ExtResource("2_bwf6x")
|
|
|
|
|
region = Rect2(8, 48, 8, 16)
|
|
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_w3vni"]
|
|
|
|
|
atlas = ExtResource("2_bwf6x")
|
|
|
|
|
region = Rect2(16, 48, 8, 16)
|
|
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_kg1c7"]
|
|
|
|
|
atlas = ExtResource("2_bwf6x")
|
|
|
|
|
region = Rect2(0, 16, 8, 16)
|
|
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_qe0jv"]
|
|
|
|
|
atlas = ExtResource("2_bwf6x")
|
|
|
|
|
region = Rect2(8, 16, 8, 16)
|
|
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_6pgul"]
|
|
|
|
|
atlas = ExtResource("2_bwf6x")
|
|
|
|
|
region = Rect2(16, 16, 8, 16)
|
|
|
|
|
|
|
|
|
|
[sub_resource type="SpriteFrames" id="SpriteFrames_q0rt3"]
|
|
|
|
|
animations = [{
|
|
|
|
|
"frames": [{
|
|
|
|
|
"duration": 1.0,
|
|
|
|
|
"texture": SubResource("AtlasTexture_pdst4")
|
|
|
|
|
}],
|
|
|
|
|
"loop": true,
|
|
|
|
|
"name": &"idle",
|
|
|
|
|
"speed": 5.0
|
|
|
|
|
}, {
|
|
|
|
|
"frames": [{
|
|
|
|
|
"duration": 1.0,
|
|
|
|
|
"texture": SubResource("AtlasTexture_s7dqe")
|
|
|
|
|
}, {
|
|
|
|
|
"duration": 1.0,
|
|
|
|
|
"texture": SubResource("AtlasTexture_irmjj")
|
|
|
|
|
}, {
|
|
|
|
|
"duration": 1.0,
|
|
|
|
|
"texture": SubResource("AtlasTexture_chuua")
|
|
|
|
|
}],
|
|
|
|
|
"loop": true,
|
|
|
|
|
"name": &"walk_down",
|
|
|
|
|
"speed": 5.0
|
|
|
|
|
}, {
|
|
|
|
|
"frames": [{
|
|
|
|
|
"duration": 1.0,
|
|
|
|
|
"texture": SubResource("AtlasTexture_nhxfa")
|
|
|
|
|
}, {
|
|
|
|
|
"duration": 1.0,
|
|
|
|
|
"texture": SubResource("AtlasTexture_tnyrl")
|
|
|
|
|
}, {
|
|
|
|
|
"duration": 1.0,
|
|
|
|
|
"texture": SubResource("AtlasTexture_awe4i")
|
|
|
|
|
}],
|
|
|
|
|
"loop": true,
|
|
|
|
|
"name": &"walk_left",
|
|
|
|
|
"speed": 5.0
|
|
|
|
|
}, {
|
|
|
|
|
"frames": [{
|
|
|
|
|
"duration": 1.0,
|
|
|
|
|
"texture": SubResource("AtlasTexture_n0dww")
|
|
|
|
|
}, {
|
|
|
|
|
"duration": 1.0,
|
|
|
|
|
"texture": SubResource("AtlasTexture_pq4ul")
|
|
|
|
|
}, {
|
|
|
|
|
"duration": 1.0,
|
|
|
|
|
"texture": SubResource("AtlasTexture_w3vni")
|
|
|
|
|
}],
|
|
|
|
|
"loop": true,
|
|
|
|
|
"name": &"walk_right",
|
|
|
|
|
"speed": 5.0
|
|
|
|
|
}, {
|
|
|
|
|
"frames": [{
|
|
|
|
|
"duration": 1.0,
|
|
|
|
|
"texture": SubResource("AtlasTexture_kg1c7")
|
|
|
|
|
}, {
|
|
|
|
|
"duration": 1.0,
|
|
|
|
|
"texture": SubResource("AtlasTexture_qe0jv")
|
|
|
|
|
}, {
|
|
|
|
|
"duration": 1.0,
|
|
|
|
|
"texture": SubResource("AtlasTexture_6pgul")
|
|
|
|
|
}],
|
|
|
|
|
"loop": true,
|
|
|
|
|
"name": &"walk_up",
|
|
|
|
|
"speed": 5.0
|
|
|
|
|
}]
|
|
|
|
|
|
2024-06-09 18:19:57 +02:00
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_oevaq"]
|
|
|
|
|
radius = 17.2627
|
|
|
|
|
|
2024-08-18 17:38:32 +02:00
|
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_e6woi"]
|
|
|
|
|
radius = 1.41421
|
|
|
|
|
|
2025-01-19 17:21:17 +01:00
|
|
|
[node name="Player" type="CharacterBody2D" node_paths=PackedStringArray("Muzzle", "EquippedWeapon") groups=["Destroyable", "player"]]
|
2024-02-27 17:16:55 +01:00
|
|
|
collision_layer = 2
|
2024-05-26 18:34:44 +02:00
|
|
|
collision_mask = 99
|
2024-02-27 17:16:55 +01:00
|
|
|
script = ExtResource("1_m27vu")
|
2024-05-26 11:40:35 +02:00
|
|
|
Speed = 2500
|
|
|
|
|
CrosshairDistance = 20.0
|
2024-06-09 18:19:57 +02:00
|
|
|
SelectorScene = ExtResource("3_8wt6s")
|
2024-08-25 17:06:59 +02:00
|
|
|
GameOverScene = "res://Scenes/GameOver.tscn"
|
2024-02-27 17:16:55 +01:00
|
|
|
Muzzle = NodePath("Muzzle")
|
2024-08-18 17:38:32 +02:00
|
|
|
Health = 32.0
|
2025-01-19 17:21:17 +01:00
|
|
|
EquippedWeapon = NodePath("Weapon")
|
2024-02-27 17:16:55 +01:00
|
|
|
metadata/_edit_group_ = true
|
|
|
|
|
|
2024-03-04 08:25:41 +01:00
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
2024-06-09 00:56:25 +02:00
|
|
|
position = Vector2(0, 1)
|
2024-03-04 08:25:41 +01:00
|
|
|
shape = SubResource("RectangleShape2D_ai4rh")
|
|
|
|
|
|
|
|
|
|
[node name="Muzzle" type="Marker2D" parent="."]
|
|
|
|
|
position = Vector2(5, 0)
|
|
|
|
|
|
|
|
|
|
[node name="Node2D" type="Node2D" parent="."]
|
|
|
|
|
|
|
|
|
|
[node name="Smoothing2D" type="Node2D" parent="."]
|
|
|
|
|
script = ExtResource("4_j4xhu")
|
|
|
|
|
flags = 55
|
|
|
|
|
|
|
|
|
|
[node name="Sprite2D" type="Sprite2D" parent="Smoothing2D"]
|
2024-02-27 17:16:55 +01:00
|
|
|
visible = false
|
|
|
|
|
scale = Vector2(2.5, 1.75)
|
|
|
|
|
texture = SubResource("AtlasTexture_omx2u")
|
|
|
|
|
hframes = 3
|
|
|
|
|
vframes = 4
|
|
|
|
|
frame = 1
|
|
|
|
|
|
2024-03-15 18:48:08 +01:00
|
|
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="Smoothing2D" groups=["player_sprite"]]
|
2024-02-28 21:29:14 +01:00
|
|
|
y_sort_enabled = true
|
2024-02-27 17:16:55 +01:00
|
|
|
sprite_frames = SubResource("SpriteFrames_q0rt3")
|
|
|
|
|
animation = &"walk_left"
|
2024-05-01 16:39:14 +02:00
|
|
|
|
2024-05-02 12:50:08 +02:00
|
|
|
[node name="Crosshair" parent="Smoothing2D" instance=ExtResource("6_l43rf")]
|
2024-06-09 18:19:57 +02:00
|
|
|
|
|
|
|
|
[node name="InteractionController" type="Area2D" parent="."]
|
|
|
|
|
collision_layer = 2
|
|
|
|
|
collision_mask = 4
|
|
|
|
|
script = ExtResource("7_uvgjg")
|
|
|
|
|
|
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="InteractionController"]
|
|
|
|
|
shape = SubResource("CircleShape2D_oevaq")
|
|
|
|
|
|
2024-08-18 17:38:32 +02:00
|
|
|
[node name="ShootTimer" type="Timer" parent="."]
|
|
|
|
|
one_shot = true
|
|
|
|
|
|
|
|
|
|
[node name="DamageHitBox" type="Area2D" parent="."]
|
|
|
|
|
collision_layer = 2
|
|
|
|
|
collision_mask = 128
|
|
|
|
|
|
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="DamageHitBox"]
|
|
|
|
|
shape = SubResource("CircleShape2D_e6woi")
|
|
|
|
|
debug_color = Color(1, 0.00817797, 0.0443347, 0.42)
|
|
|
|
|
|
2024-11-15 16:32:26 +01:00
|
|
|
[node name="Weapon" parent="." instance=ExtResource("9_wblq0")]
|
|
|
|
|
BulletScene = ExtResource("2_ov36d")
|
|
|
|
|
RateOfFire = 0.1
|
|
|
|
|
BulletCapacity = 100
|
|
|
|
|
ReloadTime = 0.4
|
|
|
|
|
BulletSpeed = 300.0
|
|
|
|
|
|
2024-06-09 18:19:57 +02:00
|
|
|
[connection signal="area_entered" from="InteractionController" to="." method="_on_interaction_controller_area_entered"]
|
2024-08-18 17:38:32 +02:00
|
|
|
[connection signal="area_entered" from="DamageHitBox" to="." method="_on_damage_hit_box_area_entered"]
|