player animations, variable triggers, & working bullets

This commit is contained in:
KevinGorman committed 2025-03-10 21:05:26 -04:00
1 parent de7312cf8e
commit 467fca0e07
23 files changed
+553 -93

No files matched your search

+64 -58
View File
@@ -1,37 +1,32 @@
[gd_scene load_steps=10 format=3 uid="uid://c7psh8jpkkc6x"]
[gd_scene load_steps=12 format=3 uid="uid://c7psh8jpkkc6x"]
[ext_resource type="Script" path="res://scripts/game controller.gd" id="1_pcysq"]
[ext_resource type="Script" path="res://scripts/trigger.gd" id="1_tp4vr"]
[ext_resource type="Script" path="res://scripts/game_controller.gd" id="1_pcysq"]
[ext_resource type="PackedScene" uid="uid://c81n274ug0a7g" path="res://scenes/trigger.tscn" id="2_ti1yu"]
[ext_resource type="PackedScene" uid="uid://b0d1gs2knc2l8" path="res://scenes/player.tscn" id="3_70p4h"]
[ext_resource type="PackedScene" uid="uid://c0tjxqfvsxh5a" path="res://scenes/crate.tscn" id="3_af2om"]
[ext_resource type="Script" path="res://scripts/crate.gd" id="4_erghp"]
[ext_resource type="PackedScene" uid="uid://dg6vhq7diydcj" path="res://scenes/bullet.tscn" id="4_vo7vc"]
[ext_resource type="Script" path="res://scripts/scene_manager.gd" id="5_w3sh3"]
[sub_resource type="CircleShape2D" id="CircleShape2D_785vb"]
radius = 88.1419
[sub_resource type="RectangleShape2D" id="RectangleShape2D_nynyi"]
size = Vector2(96, 20)
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_ukrrp"]
distance = -212.0
[sub_resource type="RectangleShape2D" id="RectangleShape2D_gv8hf"]
[sub_resource type="CircleShape2D" id="CircleShape2D_5skqu"]
[node name="AhmedGG" type="Node2D"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_xevc8"]
size = Vector2(12.7899, 20)
[node name="Game" type="Node2D"]
scale = Vector2(1.00342, 1)
script = ExtResource("1_pcysq")
[node name="Trigger" type="Area2D" parent="."]
position = Vector2(400, 339)
script = ExtResource("1_tp4vr")
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="Trigger"]
shape = SubResource("CircleShape2D_785vb")
debug_color = Color(0.489643, 0.4608, 0.929032, 0.42)
[node name="level" type="Node2D" parent="."]
[node name="StaticBody2D" type="StaticBody2D" parent="level"]
position = Vector2(296, 246)
position = Vector2(363.756, 472)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/StaticBody2D"]
@@ -41,10 +36,11 @@ shape = SubResource("RectangleShape2D_nynyi")
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/StaticBody2D2"]
position = Vector2(295, 431)
scale = Vector2(9.37136, 1)
shape = SubResource("WorldBoundaryShape2D_ukrrp")
[node name="StaticBody2D3" type="StaticBody2D" parent="level"]
position = Vector2(394, 228)
position = Vector2(463.415, 416)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/StaticBody2D3"]
@@ -52,65 +48,55 @@ rotation = -0.412146
shape = SubResource("RectangleShape2D_nynyi")
[node name="StaticBody2D4" type="StaticBody2D" parent="level"]
position = Vector2(109, 358)
position = Vector2(161.448, 545)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/StaticBody2D4"]
shape = SubResource("RectangleShape2D_nynyi")
[node name="StaticBody2D5" type="StaticBody2D" parent="level"]
position = Vector2(182, 299)
position = Vector2(258.117, 505)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/StaticBody2D5"]
shape = SubResource("RectangleShape2D_nynyi")
[node name="StaticBody2D6" type="StaticBody2D" parent="level"]
position = Vector2(161, 225)
position = Vector2(576.03, 550)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/StaticBody2D6"]
shape = SubResource("RectangleShape2D_nynyi")
[node name="StaticBody2D7" type="StaticBody2D" parent="level"]
position = Vector2(61.7887, 591)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="level/StaticBody2D7"]
shape = SubResource("RectangleShape2D_nynyi")
[node name="crates" type="Node2D" parent="."]
scale = Vector2(1.00102, 1)
[node name="RigidBody2D" type="RigidBody2D" parent="crates"]
position = Vector2(307, 34)
rotation = 0.785398
metadata/_edit_group_ = true
[node name="crate1" parent="crates" instance=ExtResource("3_af2om")]
position = Vector2(620.876, 381)
scale = Vector2(0.961, 1)
script = ExtResource("4_erghp")
[node name="CollisionShape2D" type="CollisionShape2D" parent="crates/RigidBody2D"]
shape = SubResource("RectangleShape2D_gv8hf")
debug_color = Color(0.850993, 0.368517, 0.134324, 0.42)
[node name="crate2" parent="crates" instance=ExtResource("3_af2om")]
position = Vector2(665.723, 305)
scale = Vector2(0.961, 1)
script = ExtResource("4_erghp")
[node name="RigidBody2D2" type="RigidBody2D" parent="crates"]
position = Vector2(247, 100)
rotation = 1.33752
metadata/_edit_group_ = true
[node name="crate3" parent="crates" instance=ExtResource("3_af2om")]
position = Vector2(740.467, 404)
scale = Vector2(0.961, 1)
script = ExtResource("4_erghp")
[node name="CollisionShape2D" type="CollisionShape2D" parent="crates/RigidBody2D2"]
shape = SubResource("RectangleShape2D_gv8hf")
debug_color = Color(0.850993, 0.368517, 0.134324, 0.42)
[node name="RigidBody2D3" type="RigidBody2D" parent="crates"]
position = Vector2(355, 185)
rotation = 2.67504
scale = Vector2(1, 1)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="crates/RigidBody2D3"]
shape = SubResource("RectangleShape2D_gv8hf")
debug_color = Color(0.850993, 0.368517, 0.134324, 0.42)
[node name="RigidBody2D4" type="RigidBody2D" parent="crates"]
position = Vector2(138.409, 137.33)
rotation = -0.933105
scale = Vector2(1, 1)
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="crates/RigidBody2D4"]
shape = SubResource("RectangleShape2D_gv8hf")
debug_color = Color(0.850993, 0.368517, 0.134324, 0.42)
[node name="crate4" parent="crates" instance=ExtResource("3_af2om")]
position = Vector2(821.191, 315)
scale = Vector2(0.961, 1)
script = ExtResource("4_erghp")
[node name="CharacterBody2D" parent="." instance=ExtResource("3_70p4h")]
position = Vector2(407, 65)
@@ -122,5 +108,25 @@ position = Vector2(-95, 221)
unique_name_in_owner = true
script = ExtResource("5_w3sh3")
[connection signal="areatrigger" from="Trigger" to="." method="_on_trigger_areatrigger"]
[connection signal="body_entered" from="Trigger" to="Trigger" method="_on_body_entered"]
[node name="Triggers" type="Node2D" parent="."]
[node name="Trigger" parent="Triggers" instance=ExtResource("2_ti1yu")]
position = Vector2(984.633, 590)
scale = Vector2(4.89056, -5.15013)
effect = "destroy"
[node name="CollisionShape2D" type="CollisionShape2D" parent="Triggers/Trigger"]
shape = SubResource("CircleShape2D_5skqu")
debug_color = Color(0.852174, 0.268268, 0.648794, 0.42)
[node name="powerup" parent="Triggers" instance=ExtResource("2_ti1yu")]
position = Vector2(485.34, 352)
rotation = 3.14159
scale = Vector2(4.28659, -3.95816)
effect = "powerup"
[node name="CollisionShape2D" type="CollisionShape2D" parent="Triggers/powerup"]
position = Vector2(-21.1567, 36.8858)
scale = Vector2(0.998303, 1.01771)
shape = SubResource("RectangleShape2D_xevc8")
debug_color = Color(0.161783, 0.629796, 0.397798, 0.42)
+7 -1
View File
@@ -1,6 +1,7 @@
[gd_scene load_steps=3 format=3 uid="uid://dg6vhq7diydcj"]
[gd_scene load_steps=4 format=3 uid="uid://dg6vhq7diydcj"]
[ext_resource type="Script" path="res://bullet.gd" id="1_oufr4"]
[ext_resource type="Texture2D" uid="uid://dfufhh6qedp4f" path="res://assets/graphics/projectiles/pixel_bullet.png" id="2_c2mac"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_5fful"]
size = Vector2(8, 2)
@@ -12,4 +13,9 @@ script = ExtResource("1_oufr4")
shape = SubResource("RectangleShape2D_5fful")
debug_color = Color(0.900724, 0.259856, 0.444017, 0.42)
[node name="Sprite2D" type="Sprite2D" parent="."]
position = Vector2(-2, 1)
scale = Vector2(-0.103094, 0.0402737)
texture = ExtResource("2_c2mac")
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
+19
View File
@@ -0,0 +1,19 @@
[gd_scene load_steps=3 format=3 uid="uid://c0tjxqfvsxh5a"]
[ext_resource type="Texture2D" uid="uid://4nqpycrddg6h" path="res://assets/graphics/Objects/crate.png" id="1_kwx7y"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_gv8hf"]
size = Vector2(40, 52)
[node name="crate1" type="RigidBody2D"]
metadata/_edit_group_ = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_gv8hf")
debug_color = Color(0.850993, 0.368517, 0.134324, 0.42)
[node name="Sprite2D" type="Sprite2D" parent="."]
texture_filter = 1
position = Vector2(0, -4)
scale = Vector2(-0.144321, -0.17212)
texture = ExtResource("1_kwx7y")
+178 -1
View File
@@ -1,6 +1,9 @@
[gd_scene load_steps=4 format=3 uid="uid://b0d1gs2knc2l8"]
[gd_scene load_steps=29 format=3 uid="uid://b0d1gs2knc2l8"]
[ext_resource type="Script" path="res://scripts/Player.gd" id="1_rdo8w"]
[ext_resource type="Texture2D" uid="uid://icriib26yeyf" path="res://assets/graphics/Player/Idle/Player Idle 48x48.png" id="2_x2pxh"]
[ext_resource type="Texture2D" uid="uid://bof6t3qn0xd1x" path="res://assets/graphics/Player/Run/player run 48x48.png" id="3_gk0t6"]
[ext_resource type="Texture2D" uid="uid://bn36q6gcynhcq" path="res://assets/graphics/Player/Jump/player jump 48x48.png" id="3_mnvao"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_wfabo"]
@@ -18,6 +21,171 @@ func _process(delta: float) -> void:
pass
"
[sub_resource type="AtlasTexture" id="AtlasTexture_o8cwf"]
atlas = ExtResource("2_x2pxh")
region = Rect2(0, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_qtraf"]
atlas = ExtResource("2_x2pxh")
region = Rect2(48, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_wuftw"]
atlas = ExtResource("2_x2pxh")
region = Rect2(96, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_v4xka"]
atlas = ExtResource("2_x2pxh")
region = Rect2(144, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_ho0ee"]
atlas = ExtResource("2_x2pxh")
region = Rect2(192, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_051bw"]
atlas = ExtResource("2_x2pxh")
region = Rect2(240, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_w1320"]
atlas = ExtResource("2_x2pxh")
region = Rect2(288, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_hx0kr"]
atlas = ExtResource("2_x2pxh")
region = Rect2(336, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_axdda"]
atlas = ExtResource("2_x2pxh")
region = Rect2(384, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_ae1dk"]
atlas = ExtResource("2_x2pxh")
region = Rect2(432, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_14dvy"]
atlas = ExtResource("3_mnvao")
region = Rect2(0, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_nao2h"]
atlas = ExtResource("3_mnvao")
region = Rect2(48, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_fr1eb"]
atlas = ExtResource("3_mnvao")
region = Rect2(96, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_sfbgs"]
atlas = ExtResource("3_gk0t6")
region = Rect2(0, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_rk2g7"]
atlas = ExtResource("3_gk0t6")
region = Rect2(48, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_bto8x"]
atlas = ExtResource("3_gk0t6")
region = Rect2(96, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_ddwp3"]
atlas = ExtResource("3_gk0t6")
region = Rect2(144, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_3ldfs"]
atlas = ExtResource("3_gk0t6")
region = Rect2(192, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_jhtx2"]
atlas = ExtResource("3_gk0t6")
region = Rect2(240, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_yjpde"]
atlas = ExtResource("3_gk0t6")
region = Rect2(288, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_gjcsd"]
atlas = ExtResource("3_gk0t6")
region = Rect2(336, 0, 48, 48)
[sub_resource type="SpriteFrames" id="SpriteFrames_ogkf0"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_o8cwf")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_qtraf")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_wuftw")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_v4xka")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ho0ee")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_051bw")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_w1320")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_hx0kr")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_axdda")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ae1dk")
}],
"loop": true,
"name": &"idle",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_14dvy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_nao2h")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_fr1eb")
}],
"loop": false,
"name": &"jump",
"speed": 9.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_sfbgs")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_rk2g7")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_bto8x")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ddwp3")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_3ldfs")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jhtx2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_yjpde")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_gjcsd")
}],
"loop": true,
"name": &"run",
"speed": 12.0
}]
[node name="CharacterBody2D" type="CharacterBody2D"]
script = ExtResource("1_rdo8w")
@@ -37,3 +205,12 @@ position = Vector2(21, -20)
[node name="leftTarget_Node2D" type="Node2D" parent="."]
position = Vector2(15, -20)
script = SubResource("GDScript_46ryu")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
texture_filter = 1
position = Vector2(1, -2)
sprite_frames = SubResource("SpriteFrames_ogkf0")
animation = &"jump"
autoplay = "jump"
[node name="Camera2D" type="Camera2D" parent="."]
+9
View File
@@ -0,0 +1,9 @@
[gd_scene load_steps=2 format=3 uid="uid://c81n274ug0a7g"]
[ext_resource type="Script" path="res://scripts/trigger.gd" id="1_ivj0o"]
[node name="Trigger" type="Area2D"]
script = ExtResource("1_ivj0o")
metadata/_edit_group_ = true
[connection signal="body_entered" from="." to="." method="_on_body_entered"]