added shooting animation; timer is a little broken

This commit is contained in:
torontocaper committed 2025-10-16 23:27:09 -04:00
1 parent 14146a476d
commit ffd98d163e
9 files changed
+302 -15

No files matched your search

+142 -4
View File
@@ -1,9 +1,11 @@
[gd_scene load_steps=27 format=3 uid="uid://d3y1iqmpknpyo"]
[gd_scene load_steps=47 format=3 uid="uid://d3y1iqmpknpyo"]
[ext_resource type="Script" uid="uid://d3hp5rjoph7hg" path="res://scripts/player.gd" id="1_3vyb7"]
[ext_resource type="Texture2D" uid="uid://dr3rp5hv7rexv" path="res://graphics/player_idle/Player Idle 48x48.png" id="2_g2els"]
[ext_resource type="Texture2D" uid="uid://uxdt2cgxicmt" path="res://graphics/player_jump/player jump 48x48.png" id="3_dqkch"]
[ext_resource type="Texture2D" uid="uid://bgp8oow6hgh5o" path="res://graphics/player_run/player run 48x48.png" id="4_qlg0r"]
[ext_resource type="Texture2D" uid="uid://dadvc8tsvmkb6" path="res://graphics/player_shoot/Player Running Shooting 48x48.png" id="5_tuyoq"]
[ext_resource type="Texture2D" uid="uid://crll0t2wjtsly" path="res://graphics/player_shoot/player shoot 2H 48x48.png" id="6_fjrip"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_3vyb7"]
radius = 6.0
@@ -89,6 +91,78 @@ region = Rect2(288, 0, 48, 48)
atlas = ExtResource("4_qlg0r")
region = Rect2(336, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_f1ej7"]
atlas = ExtResource("5_tuyoq")
region = Rect2(0, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_l71n6"]
atlas = ExtResource("5_tuyoq")
region = Rect2(48, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_ke2ow"]
atlas = ExtResource("5_tuyoq")
region = Rect2(96, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_ujl30"]
atlas = ExtResource("5_tuyoq")
region = Rect2(144, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_31cv2"]
atlas = ExtResource("5_tuyoq")
region = Rect2(192, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_pf23h"]
atlas = ExtResource("5_tuyoq")
region = Rect2(240, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_dt7fs"]
atlas = ExtResource("5_tuyoq")
region = Rect2(288, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_wqfne"]
atlas = ExtResource("5_tuyoq")
region = Rect2(336, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_wnwbv"]
atlas = ExtResource("6_fjrip")
region = Rect2(0, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_gl8cc"]
atlas = ExtResource("6_fjrip")
region = Rect2(48, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_487ah"]
atlas = ExtResource("6_fjrip")
region = Rect2(96, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_md1ol"]
atlas = ExtResource("6_fjrip")
region = Rect2(144, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_bj30b"]
atlas = ExtResource("6_fjrip")
region = Rect2(192, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_jc3p3"]
atlas = ExtResource("6_fjrip")
region = Rect2(240, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_hax0n"]
atlas = ExtResource("6_fjrip")
region = Rect2(288, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_t4otl"]
atlas = ExtResource("6_fjrip")
region = Rect2(336, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_j2b1d"]
atlas = ExtResource("6_fjrip")
region = Rect2(384, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_cs1tg"]
atlas = ExtResource("6_fjrip")
region = Rect2(432, 0, 48, 48)
[sub_resource type="SpriteFrames" id="SpriteFrames_3vyb7"]
animations = [{
"frames": [{
@@ -170,6 +244,70 @@ animations = [{
"loop": true,
"name": &"run",
"speed": 15.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_f1ej7")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_l71n6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ke2ow")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ujl30")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_31cv2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_pf23h")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_dt7fs")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_wqfne")
}],
"loop": false,
"name": &"shoot_run",
"speed": 15.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_wnwbv")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_gl8cc")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_487ah")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_md1ol")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_bj30b")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jc3p3")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_hax0n")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_t4otl")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_j2b1d")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_cs1tg")
}],
"loop": false,
"name": &"shoot_still",
"speed": 15.0
}]
[node name="Player" type="CharacterBody2D"]
@@ -188,14 +326,14 @@ target_position = Vector2(50, 0)
target_position = Vector2(-50, 0)
[node name="RightSpawn" type="Marker2D" parent="."]
position = Vector2(10, -4)
position = Vector2(16, -7)
[node name="LeftSpawn" type="Marker2D" parent="."]
position = Vector2(-10, -4)
position = Vector2(-16, -7)
[node name="PlayerSprite" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_3vyb7")
animation = &"jump"
animation = &"shoot_run"
autoplay = "idle"
[node name="Camera2D" type="Camera2D" parent="."]