graphics for bullet, crate, animation for player, state machine

This commit is contained in:
AutumnMayes committed 2025-06-16 21:01:29 -04:00
1 parent 8a78da855c
commit a7e18c2689
21 files changed
+569 -35

No files matched your search

+183 -1
View File
@@ -1,9 +1,182 @@
[gd_scene load_steps=3 format=3 uid="uid://bu8e4iyw8pc03"]
[gd_scene load_steps=28 format=3 uid="uid://bu8e4iyw8pc03"]
[ext_resource type="Script" uid="uid://dsryf6gxqcm1k" path="res://Scripts/character_body_2d.gd" id="1_0y7nr"]
[ext_resource type="Texture2D" uid="uid://dpv7hte6i8kui" path="res://Assets/Graphics/Player/Jump/player jump 48x48.png" id="2_dewec"]
[ext_resource type="Texture2D" uid="uid://dl452cit6hmxl" path="res://Assets/Graphics/Player/Idle/Player Idle 48x48.png" id="2_kyqiw"]
[ext_resource type="Texture2D" uid="uid://bmrxpbm2roq7s" path="res://Assets/Graphics/Player/Run/player run 48x48.png" id="3_gntrk"]
[sub_resource type="CircleShape2D" id="CircleShape2D_2poj3"]
[sub_resource type="AtlasTexture" id="AtlasTexture_5v66d"]
atlas = ExtResource("2_dewec")
region = Rect2(96, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_gntrk"]
atlas = ExtResource("2_kyqiw")
region = Rect2(0, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_dewec"]
atlas = ExtResource("2_kyqiw")
region = Rect2(48, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_5ixxa"]
atlas = ExtResource("2_kyqiw")
region = Rect2(96, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_nn08x"]
atlas = ExtResource("2_kyqiw")
region = Rect2(144, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_52ee3"]
atlas = ExtResource("2_kyqiw")
region = Rect2(192, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_bhhdu"]
atlas = ExtResource("2_kyqiw")
region = Rect2(240, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_megsn"]
atlas = ExtResource("2_kyqiw")
region = Rect2(288, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_yoq75"]
atlas = ExtResource("2_kyqiw")
region = Rect2(336, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_ksbbd"]
atlas = ExtResource("2_kyqiw")
region = Rect2(384, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_glx4g"]
atlas = ExtResource("2_kyqiw")
region = Rect2(432, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_x63xi"]
atlas = ExtResource("2_dewec")
region = Rect2(0, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_i2e8t"]
atlas = ExtResource("2_dewec")
region = Rect2(48, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_miouo"]
atlas = ExtResource("3_gntrk")
region = Rect2(0, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_o3h8g"]
atlas = ExtResource("3_gntrk")
region = Rect2(48, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_1e7my"]
atlas = ExtResource("3_gntrk")
region = Rect2(96, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_arntx"]
atlas = ExtResource("3_gntrk")
region = Rect2(144, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_lslt6"]
atlas = ExtResource("3_gntrk")
region = Rect2(192, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_ulo2v"]
atlas = ExtResource("3_gntrk")
region = Rect2(240, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_1iu4k"]
atlas = ExtResource("3_gntrk")
region = Rect2(288, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_m0x7a"]
atlas = ExtResource("3_gntrk")
region = Rect2(336, 0, 48, 48)
[sub_resource type="SpriteFrames" id="SpriteFrames_miouo"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_5v66d")
}],
"loop": true,
"name": &"falling",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_gntrk")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_dewec")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_5ixxa")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_nn08x")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_52ee3")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_bhhdu")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_megsn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_yoq75")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ksbbd")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_glx4g")
}],
"loop": true,
"name": &"idle",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_x63xi")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_i2e8t")
}],
"loop": false,
"name": &"jump",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_miouo")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_o3h8g")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1e7my")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_arntx")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_lslt6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ulo2v")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1iu4k")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_m0x7a")
}],
"loop": true,
"name": &"run",
"speed": 12.0
}]
[node name="CharacterBody2D" type="CharacterBody2D"]
script = ExtResource("1_0y7nr")
metadata/_edit_group_ = true
@@ -23,3 +196,12 @@ position = Vector2(17, -8)
[node name="LeftSpawn" type="Node2D" parent="."]
position = Vector2(-14, -9)
[node name="PlayerGraphic" type="AnimatedSprite2D" parent="."]
texture_filter = 1
position = Vector2(0, -6)
sprite_frames = SubResource("SpriteFrames_miouo")
animation = &"falling"
autoplay = "idle"
[connection signal="animation_finished" from="PlayerGraphic" to="." method="_on_animation_finished"]
+12 -3
View File
@@ -1,14 +1,23 @@
[gd_scene load_steps=3 format=3 uid="uid://cm8o5vpn4a00"]
[gd_scene load_steps=4 format=3 uid="uid://cm8o5vpn4a00"]
[ext_resource type="Script" uid="uid://q1ok5ukbtibm" path="res://bullet.gd" id="1_xjght"]
[ext_resource type="Script" uid="uid://q1ok5ukbtibm" path="res://Scripts/bullet.gd" id="1_xjght"]
[ext_resource type="Texture2D" uid="uid://s8lg7ju2rbga" path="res://Assets/Graphics/Projectiles/pixel_bullet.png" id="2_oduel"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_oduel"]
size = Vector2(14, 4)
size = Vector2(13, 4)
[node name="Bullet" type="Area2D"]
script = ExtResource("1_xjght")
metadata/_edit_group_ = true
[node name="Sprite2D" type="Sprite2D" parent="."]
position = Vector2(-3, -2)
rotation = -3.14159
scale = Vector2(0.0896342, 0.0851218)
texture = ExtResource("2_oduel")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
texture_filter = 1
position = Vector2(0.5, 0)
shape = SubResource("RectangleShape2D_oduel")
debug_color = Color(0.995859, 0, 0.197667, 0.42)
+8 -2
View File
@@ -1,11 +1,17 @@
[gd_scene load_steps=2 format=3 uid="uid://cd7fv3pwgr880"]
[gd_scene load_steps=3 format=3 uid="uid://cd7fv3pwgr880"]
[ext_resource type="Texture2D" uid="uid://m685ffchmchr" path="res://Assets/Graphics/Objects/crate.png" id="1_wp72f"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ebmjs"]
[node name="RigidBody2D3" type="RigidBody2D"]
rotation = -0.544116
metadata/_edit_group_ = true
[node name="Sprite2D" type="Sprite2D" parent="."]
position = Vector2(0, 1)
scale = Vector2(0.0754011, 0.0688039)
texture = ExtResource("1_wp72f")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_ebmjs")
debug_color = Color(0.796822, 0.420181, 0.140254, 0.42)
+84 -14
View File
@@ -1,29 +1,90 @@
[gd_scene load_steps=8 format=3 uid="uid://c6mxse0hqjro7"]
[gd_scene load_steps=12 format=4 uid="uid://c6mxse0hqjro7"]
[ext_resource type="Script" uid="uid://tno7aku0yyke" path="res://Scripts/gamecontroller.gd" id="1_wrm1d"]
[ext_resource type="Texture2D" uid="uid://mfcyrgamj3cc" path="res://Assets/Graphics/Terrains/Terrain (32x32).png" id="2_1l0tm"]
[ext_resource type="Script" uid="uid://bs4frobn6kxne" path="res://Scripts/scene_manager.gd" id="2_i6g32"]
[ext_resource type="PackedScene" uid="uid://cd7fv3pwgr880" path="res://Scenes/crate.tscn" id="3_3dryh"]
[ext_resource type="PackedScene" uid="uid://bu8e4iyw8pc03" path="res://Scenes/Player.tscn" id="4_3dryh"]
[ext_resource type="PackedScene" uid="uid://b5d8himq5sttt" path="res://Scenes/trigger.tscn" id="4_wowpa"]
[ext_resource type="PackedScene" uid="uid://cm8o5vpn4a00" path="res://Scenes/bullet.tscn" id="5_wowpa"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_v158k"]
texture = ExtResource("2_1l0tm")
texture_region_size = Vector2i(32, 32)
0:0/0 = 0
1:0/0 = 0
2:0/0 = 0
4:0/0 = 0
6:0/0 = 0
7:0/0 = 0
9:0/0 = 0
10:0/0 = 0
12:0/0 = 0
13:0/0 = 0
15:0/0 = 0
0:1/0 = 0
1:1/0 = 0
2:1/0 = 0
4:1/0 = 0
6:1/0 = 0
7:1/0 = 0
9:1/0 = 0
10:1/0 = 0
12:1/0 = 0
13:1/0 = 0
15:1/0 = 0
16:1/0 = 0
0:2/0 = 0
1:2/0 = 0
2:2/0 = 0
4:2/0 = 0
6:3/0 = 0
7:3/0 = 0
9:3/0 = 0
10:3/0 = 0
12:3/0 = 0
13:3/0 = 0
15:3/0 = 0
16:3/0 = 0
0:4/0 = 0
1:4/0 = 0
2:4/0 = 0
4:4/0 = 0
6:4/0 = 0
7:4/0 = 0
9:4/0 = 0
10:4/0 = 0
12:4/0 = 0
13:4/0 = 0
15:4/0 = 0
16:4/0 = 0
[sub_resource type="TileSet" id="TileSet_h4fw4"]
tile_size = Vector2i(32, 32)
sources/0 = SubResource("TileSetAtlasSource_v158k")
[sub_resource type="RectangleShape2D" id="RectangleShape2D_2poj3"]
size = Vector2(50, 20)
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_1l0tm"]
[node name="Game" type="Node2D"]
script = ExtResource("1_wrm1d")
[node name="TileMapLayer" type="TileMapLayer" parent="."]
tile_map_data = PackedByteArray("AAASAAoAAAAEAAQAAAATAAoAAAAEAAQAAAAUAAoAAAAEAAQAAAAVAAoAAAAEAAQAAAARAAoAAAAEAAQAAAAQAAoAAAAEAAQAAAAPAAoAAAAEAAQAAAA=")
tile_set = SubResource("TileSet_h4fw4")
[node name="SceneManager" type="Node2D" parent="."]
unique_name_in_owner = true
script = ExtResource("2_i6g32")
[node name="StaticBody2D" type="StaticBody2D" parent="."]
position = Vector2(595, 337)
scale = Vector2(4.146, 0.985995)
position = Vector2(592, 337)
scale = Vector2(4.45399, 1.56585)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
scale = Vector2(1, 1)
shape = SubResource("RectangleShape2D_2poj3")
[node name="RigidBody2D3" parent="." instance=ExtResource("3_3dryh")]
@@ -35,18 +96,27 @@ position = Vector2(616, 222)
[node name="RigidBody2D5" parent="." instance=ExtResource("3_3dryh")]
position = Vector2(574, 222)
[node name="Area2D2" parent="." instance=ExtResource("4_wowpa")]
position = Vector2(507, 414)
effect = "destroy"
[node name="Area2D3" parent="." instance=ExtResource("4_wowpa")]
position = Vector2(679, 430)
[node name="CharacterBody2D" parent="." instance=ExtResource("4_3dryh")]
position = Vector2(614, 314)
position = Vector2(613, 309)
[node name="Bullet" parent="." instance=ExtResource("5_wowpa")]
position = Vector2(520, 265)
[connection signal="areatrigger" from="Area2D2" to="." method="_on_areatrigger"]
[connection signal="areatrigger" from="Area2D3" to="." method="_on_areatrigger"]
[node name="Triggers" type="Node2D" parent="."]
[node name="Area2D2" parent="Triggers" instance=ExtResource("4_wowpa")]
position = Vector2(507, 414)
effect = "destroy"
[node name="Area2D3" parent="Triggers" instance=ExtResource("4_wowpa")]
position = Vector2(679, 430)
[node name="StaticBody2D2" type="StaticBody2D" parent="."]
position = Vector2(589, 544)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D2"]
shape = SubResource("WorldBoundaryShape2D_1l0tm")
[connection signal="areatrigger" from="Triggers/Area2D2" to="." method="_on_areatrigger"]
[connection signal="areatrigger" from="Triggers/Area2D3" to="." method="_on_areatrigger"]