fight system and whatnot

This commit is contained in:
2025-10-29 01:47:45 +01:00
parent 527be3ee5d
commit 84f75cb2a7
41 changed files with 1433 additions and 57 deletions

View File

@@ -1,7 +1,9 @@
[gd_scene load_steps=22 format=3 uid="uid://dfbomt0l6b1o4"]
[gd_scene load_steps=31 format=3 uid="uid://dfbomt0l6b1o4"]
[ext_resource type="Script" uid="uid://dxvslwwnnlosy" path="res://scripts/player.gd" id="1_3vyb7"]
[ext_resource type="Texture2D" uid="uid://d06cv484ev2n3" path="res://assets/textures/spritesheets/normal_player.png" id="2_qhqgy"]
[ext_resource type="PackedScene" uid="uid://c48stuhi2qml3" path="res://scenes/menus/hud.tscn" id="3_qhqgy"]
[ext_resource type="Texture2D" uid="uid://c1yunf5rn1ncd" path="res://assets/textures/spritesheets/attack.png" id="4_dqkch"]
[sub_resource type="AtlasTexture" id="AtlasTexture_dqkch"]
atlas = ExtResource("2_qhqgy")
@@ -15,30 +17,30 @@ region = Rect2(32, 0, 32, 32)
atlas = ExtResource("2_qhqgy")
region = Rect2(64, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_fjrip"]
atlas = ExtResource("2_qhqgy")
region = Rect2(0, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_3v2ag"]
atlas = ExtResource("2_qhqgy")
region = Rect2(96, 64, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_jej6c"]
[sub_resource type="AtlasTexture" id="AtlasTexture_fjrip"]
atlas = ExtResource("2_qhqgy")
region = Rect2(96, 0, 32, 32)
region = Rect2(0, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_f1ej7"]
atlas = ExtResource("2_qhqgy")
region = Rect2(0, 96, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_oprun"]
[sub_resource type="AtlasTexture" id="AtlasTexture_jej6c"]
atlas = ExtResource("2_qhqgy")
region = Rect2(64, 32, 32, 32)
region = Rect2(96, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_a8ls1"]
atlas = ExtResource("2_qhqgy")
region = Rect2(32, 96, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_oprun"]
atlas = ExtResource("2_qhqgy")
region = Rect2(64, 32, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_qfm1y"]
atlas = ExtResource("2_qhqgy")
region = Rect2(96, 0, 32, 32)
@@ -92,36 +94,36 @@ animations = [{
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_fjrip")
"texture": SubResource("AtlasTexture_3v2ag")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_3v2ag")
"texture": SubResource("AtlasTexture_fjrip")
}],
"loop": true,
"loop": false,
"name": &"hand_down",
"speed": 3.0
"speed": 4.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_jej6c")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_f1ej7")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jej6c")
}],
"loop": true,
"loop": false,
"name": &"hand_side",
"speed": 3.0
"speed": 4.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_oprun")
"texture": SubResource("AtlasTexture_a8ls1")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_a8ls1")
"texture": SubResource("AtlasTexture_oprun")
}],
"loop": true,
"loop": false,
"name": &"hand_up",
"speed": 3.0
"speed": 4.0
}, {
"frames": [{
"duration": 1.0,
@@ -178,7 +180,58 @@ animations = [{
radius = 6.0
height = 14.0
[sub_resource type="AtlasTexture" id="AtlasTexture_d2wvv"]
atlas = ExtResource("4_dqkch")
region = Rect2(0, 0, 32, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_i4ail"]
atlas = ExtResource("4_dqkch")
region = Rect2(0, 16, 32, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_a38lo"]
atlas = ExtResource("4_dqkch")
region = Rect2(0, 32, 32, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_4ni07"]
atlas = ExtResource("4_dqkch")
region = Rect2(0, 48, 32, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_l71n6"]
atlas = ExtResource("4_dqkch")
region = Rect2(0, 64, 32, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_y4r1p"]
atlas = ExtResource("4_dqkch")
region = Rect2(0, 80, 32, 16)
[sub_resource type="SpriteFrames" id="SpriteFrames_ke2ow"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_d2wvv")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_i4ail")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_a38lo")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_4ni07")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_l71n6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_y4r1p")
}],
"loop": false,
"name": &"default",
"speed": 12.0
}]
[node name="Player" type="CharacterBody2D"]
collision_layer = 3
motion_mode = 1
script = ExtResource("1_3vyb7")
@@ -198,8 +251,20 @@ drag_horizontal_enabled = true
drag_vertical_enabled = true
[node name="RayCast2D" type="RayCast2D" parent="."]
target_position = Vector2(0, 32)
position = Vector2(0, 10)
target_position = Vector2(0, 22)
collision_mask = 2
hit_from_inside = true
collide_with_areas = true
collide_with_bodies = false
[node name="HUD" parent="." instance=ExtResource("3_qhqgy")]
[node name="CursorHideTimer" type="Timer" parent="."]
[node name="FightAnimation" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_ke2ow")
frame = 5
frame_progress = 1.0
offset = Vector2(0, 24)
flip_v = true