feat: new hit anim

This commit is contained in:
2025-08-01 17:58:25 +02:00
parent f914032f8f
commit 5c9add1fe4
4 changed files with 49 additions and 26 deletions

BIN
player/assets/Outch.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dwn548x0n4bpd"
path="res://.godot/imported/Outch.png-fb0d67fa327c4c83d19c4122b53475dc.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://player/assets/Outch.png"
dest_files=["res://.godot/imported/Outch.png-fb0d67fa327c4c83d19c4122b53475dc.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@ -63,9 +63,9 @@ func _physics_process(delta: float) -> void:
velocity += get_gravity() * delta * gravity_modifier
var direction := Input.get_axis("move_left", "move_right")
if direction > 0:
if direction > 0 and is_on_floor():
look_right()
if direction < 0:
if direction < 0 and is_on_floor():
look_left()

View File

@ -1,29 +1,21 @@
[gd_scene load_steps=32 format=3 uid="uid://yvp44oauis4n"]
[gd_scene load_steps=30 format=3 uid="uid://yvp44oauis4n"]
[ext_resource type="Script" uid="uid://c1fqj3lba7wik" path="res://player/player.gd" id="1_yw30f"]
[ext_resource type="SpriteFrames" uid="uid://i6035vm5ited" path="res://player/armored_spritesheet.tres" id="2_qjkh3"]
[ext_resource type="Texture2D" uid="uid://dg1okdxx73qx2" path="res://player/assets/itch hurt 2 sheet-Sheet.png" id="3_g6k8r"]
[ext_resource type="Texture2D" uid="uid://dwn548x0n4bpd" path="res://player/assets/Outch.png" id="3_rgyib"]
[ext_resource type="Texture2D" uid="uid://dr5ypp4q8n2xm" path="res://player/assets/DebutIdle.png" id="4_rgyib"]
[ext_resource type="Texture2D" uid="uid://dsxvqsh3umw01" path="res://player/assets/RunCycle.png" id="5_boad6"]
[ext_resource type="PackedScene" uid="uid://djwoetcyvvofc" path="res://damageable/damageable.tscn" id="5_g6k8r"]
[ext_resource type="Shape2D" uid="uid://6rhdwj5jxbxn" path="res://player/player_collision.tres" id="5_qjkh3"]
[ext_resource type="Texture2D" uid="uid://dw6tn0grt2ajc" path="res://player/assets/WalkCycle.png" id="5_rgyib"]
[sub_resource type="AtlasTexture" id="AtlasTexture_boad6"]
atlas = ExtResource("3_g6k8r")
region = Rect2(80, 0, 80, 80)
[sub_resource type="AtlasTexture" id="AtlasTexture_rgyib"]
atlas = ExtResource("3_g6k8r")
region = Rect2(160, 0, 80, 80)
[sub_resource type="AtlasTexture" id="AtlasTexture_hg6s5"]
atlas = ExtResource("3_g6k8r")
region = Rect2(240, 0, 80, 80)
atlas = ExtResource("3_rgyib")
region = Rect2(0, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_8t03j"]
atlas = ExtResource("3_g6k8r")
region = Rect2(320, 0, 80, 80)
atlas = ExtResource("3_rgyib")
region = Rect2(32, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_wodsf"]
atlas = ExtResource("4_rgyib")
@ -101,20 +93,14 @@ region = Rect2(352, 0, 32, 32)
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_boad6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_rgyib")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_hg6s5")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_8t03j")
}],
"loop": false,
"loop": true,
"name": &"got_hit",
"speed": 10.0
"speed": 8.0
}, {
"frames": [{
"duration": 1.0,
@ -205,9 +191,9 @@ autoplay = "idle"
[node name="Base" type="AnimatedSprite2D" parent="."]
position = Vector2(0, -16)
sprite_frames = SubResource("SpriteFrames_mmwog")
animation = &"jump"
animation = &"got_hit"
autoplay = "idle"
frame_progress = 0.808295
frame_progress = 0.993718
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
visible = false