enemies, gamecontroller, playerdeath, coins

This commit is contained in:
fabianainu committed 2024-12-16 21:16:05 -05:00
1 parent d84835dab2
commit 5ca3a193d1
21 files changed
+732 -91

No files matched your search

+73
View File
@@ -0,0 +1,73 @@
[gd_scene load_steps=9 format=3 uid="uid://b0pun5awvst0k"]
[ext_resource type="Texture2D" uid="uid://grew2f48lbpx" path="res://assets/graphics/enemies/slime_green.png" id="1_55ykq"]
[ext_resource type="Script" path="res://scripts/badguy.gd" id="1_i2hx4"]
[sub_resource type="AtlasTexture" id="AtlasTexture_qpxa3"]
atlas = ExtResource("1_55ykq")
region = Rect2(0, 24, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_3sedu"]
atlas = ExtResource("1_55ykq")
region = Rect2(24, 24, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_hmqye"]
atlas = ExtResource("1_55ykq")
region = Rect2(48, 24, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_i8j10"]
atlas = ExtResource("1_55ykq")
region = Rect2(72, 24, 24, 24)
[sub_resource type="SpriteFrames" id="SpriteFrames_lk04i"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_qpxa3")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_3sedu")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_hmqye")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_i8j10")
}],
"loop": true,
"name": &"idle",
"speed": 12.0
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_88k5w"]
size = Vector2(14, 14)
[node name="Area2D" type="Area2D"]
script = ExtResource("1_i2hx4")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
texture_filter = 1
sprite_frames = SubResource("SpriteFrames_lk04i")
animation = &"idle"
autoplay = "idle"
frame_progress = 0.696237
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, 5)
shape = SubResource("RectangleShape2D_88k5w")
[node name="CastRight" type="RayCast2D" parent="."]
target_position = Vector2(14, 0)
[node name="CastLeft" type="RayCast2D" parent="."]
target_position = Vector2(-14, 0)
[node name="CastFloorRight" type="RayCast2D" parent="."]
position = Vector2(9, 5)
target_position = Vector2(0, 13)
[node name="CastFloorLeft" type="RayCast2D" parent="."]
position = Vector2(-9, 5)
target_position = Vector2(0, 13)
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
+113
View File
@@ -0,0 +1,113 @@
[gd_scene load_steps=17 format=3 uid="uid://cttwpovmajtsa"]
[ext_resource type="Texture2D" uid="uid://2alfmycos3hc" path="res://assets/graphics/pickups/coin.png" id="1_3uqv3"]
[ext_resource type="Script" path="res://scripts/coin.gd" id="1_xjdrh"]
[sub_resource type="CircleShape2D" id="CircleShape2D_yrydk"]
radius = 5.0
[sub_resource type="AtlasTexture" id="AtlasTexture_28o60"]
atlas = ExtResource("1_3uqv3")
region = Rect2(0, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_dy7dh"]
atlas = ExtResource("1_3uqv3")
region = Rect2(16, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_36not"]
atlas = ExtResource("1_3uqv3")
region = Rect2(32, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_mlbb3"]
atlas = ExtResource("1_3uqv3")
region = Rect2(48, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_gw3cn"]
atlas = ExtResource("1_3uqv3")
region = Rect2(64, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_mr785"]
atlas = ExtResource("1_3uqv3")
region = Rect2(80, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_3ja4u"]
atlas = ExtResource("1_3uqv3")
region = Rect2(96, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_hirih"]
atlas = ExtResource("1_3uqv3")
region = Rect2(112, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_sqfn2"]
atlas = ExtResource("1_3uqv3")
region = Rect2(128, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_0vheq"]
atlas = ExtResource("1_3uqv3")
region = Rect2(144, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_26js3"]
atlas = ExtResource("1_3uqv3")
region = Rect2(160, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_j4cxo"]
atlas = ExtResource("1_3uqv3")
region = Rect2(176, 0, 16, 16)
[sub_resource type="SpriteFrames" id="SpriteFrames_porqx"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_28o60")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_dy7dh")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_36not")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_mlbb3")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_gw3cn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_mr785")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_3ja4u")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_hirih")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_sqfn2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_0vheq")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_26js3")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_j4cxo")
}],
"loop": true,
"name": &"default",
"speed": 12.0
}]
[node name="Area2D" type="Area2D"]
script = ExtResource("1_xjdrh")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_yrydk")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
texture_filter = 1
sprite_frames = SubResource("SpriteFrames_porqx")
autoplay = "default"
frame_progress = 0.258061
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
+114 -2
View File
@@ -1,13 +1,71 @@
[gd_scene load_steps=28 format=3 uid="uid://djgtbc1quqvwe"]
[gd_scene load_steps=44 format=3 uid="uid://djgtbc1quqvwe"]
[ext_resource type="Script" path="res://scripts/dudecontroller.gd" id="1_ay2gi"]
[ext_resource type="Texture2D" uid="uid://dvgh32yadcjcq" path="res://assets/graphics/player/idle/Player Idle 48x48.png" id="2_5mbmt"]
[ext_resource type="Texture2D" uid="uid://385u5ioc15bk" path="res://assets/graphics/player/dead/Player Death 64x64.png" id="2_10ats"]
[ext_resource type="Texture2D" uid="uid://1tiutqy11mhk" path="res://assets/graphics/player/hurt/Player Hurt 48x48.png" id="2_p1quv"]
[ext_resource type="Texture2D" uid="uid://2mxlso64vnrk" path="res://assets/graphics/player/run/player run 48x48.png" id="3_2y1a6"]
[ext_resource type="Texture2D" uid="uid://cwiun1ntuu02d" path="res://assets/graphics/player/jump/player jump 48x48.png" id="3_5o14d"]
[sub_resource type="CircleShape2D" id="CircleShape2D_iice4"]
radius = 6.32456
[sub_resource type="AtlasTexture" id="AtlasTexture_5pxpi"]
atlas = ExtResource("2_10ats")
region = Rect2(0, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_r74fh"]
atlas = ExtResource("2_10ats")
region = Rect2(48, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_m7phw"]
atlas = ExtResource("2_10ats")
region = Rect2(96, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_gay5g"]
atlas = ExtResource("2_10ats")
region = Rect2(144, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_t22ra"]
atlas = ExtResource("2_10ats")
region = Rect2(192, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_grdn6"]
atlas = ExtResource("2_10ats")
region = Rect2(240, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_xqiyd"]
atlas = ExtResource("2_10ats")
region = Rect2(288, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_0cbok"]
atlas = ExtResource("2_10ats")
region = Rect2(336, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_licv2"]
atlas = ExtResource("2_10ats")
region = Rect2(384, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_p8pio"]
atlas = ExtResource("2_10ats")
region = Rect2(432, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_2erm2"]
atlas = ExtResource("2_p1quv")
region = Rect2(0, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_ry778"]
atlas = ExtResource("2_p1quv")
region = Rect2(48, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_1xrha"]
atlas = ExtResource("2_p1quv")
region = Rect2(96, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_0oqh6"]
atlas = ExtResource("2_p1quv")
region = Rect2(144, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_1yv5c"]
atlas = ExtResource("2_5mbmt")
region = Rect2(0, 0, 48, 48)
@@ -96,6 +154,58 @@ region = Rect2(336, 0, 48, 48)
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_5pxpi")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_r74fh")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_m7phw")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_gay5g")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_t22ra")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_grdn6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xqiyd")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_0cbok")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_licv2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_p8pio")
}],
"loop": false,
"name": &"Dead",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_2erm2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ry778")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1xrha")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_0oqh6")
}],
"loop": false,
"name": &"Hurt",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_1yv5c")
}, {
"duration": 1.0,
@@ -200,8 +310,10 @@ position = Vector2(-6, -5)
texture_filter = 1
scale = Vector2(1.00239, 0.967018)
sprite_frames = SubResource("SpriteFrames_ck70u")
animation = &"Idle"
animation = &"Dead"
autoplay = "Idle"
[node name="Camera2D" type="Camera2D" parent="."]
offset = Vector2(0, -30)
[connection signal="animation_finished" from="AnimatedSprite2D" to="." method="_on_animation_finished"]
+40 -6
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=15 format=4 uid="uid://ciko2h5jj1a3k"]
[gd_scene load_steps=17 format=4 uid="uid://ciko2h5jj1a3k"]
[ext_resource type="PackedScene" uid="uid://djgtbc1quqvwe" path="res://scenes/dude.tscn" id="1_4l1yw"]
[ext_resource type="Texture2D" uid="uid://d3da1xpx6f8do" path="res://assets/graphics/environment/background/forestbackground.png" id="1_i3nvv"]
@@ -10,6 +10,8 @@
[ext_resource type="Texture2D" uid="uid://bcwyohfx8ft18" path="res://assets/graphics/environment/background/sky_strip.png" id="2_twm8w"]
[ext_resource type="Texture2D" uid="uid://dmsqm0stkx5s2" path="res://assets/graphics/environment/background/clouds.png" id="3_nw1b4"]
[ext_resource type="Texture2D" uid="uid://c5r8lr50mwhws" path="res://assets/graphics/environment/background/midgroud_grass.png" id="4_d4yqf"]
[ext_resource type="PackedScene" uid="uid://cttwpovmajtsa" path="res://scenes/coin.tscn" id="11_v5ca1"]
[ext_resource type="PackedScene" uid="uid://b0pun5awvst0k" path="res://scenes/badguy.tscn" id="12_18k5f"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_bdyqk"]
texture = ExtResource("1_yjgfx")
@@ -451,15 +453,15 @@ unique_name_in_owner = true
script = ExtResource("1_tpgoh")
[node name="CharacterBody2D" parent="." instance=ExtResource("1_4l1yw")]
position = Vector2(160, 90)
position = Vector2(305, -22)
[node name="RigidBody2D" parent="." groups=["shootable"] instance=ExtResource("1_mg5q5")]
position = Vector2(92, 53)
[node name="Box" parent="." groups=["shootable"] instance=ExtResource("1_mg5q5")]
position = Vector2(137, 23)
[node name="RigidBody2D2" parent="." groups=["shootable"] instance=ExtResource("1_mg5q5")]
[node name="Box2" parent="." groups=["shootable"] instance=ExtResource("1_mg5q5")]
position = Vector2(261, 64)
[node name="RigidBody2D3" parent="." groups=["shootable"] instance=ExtResource("1_mg5q5")]
[node name="Box3" parent="." groups=["shootable"] instance=ExtResource("1_mg5q5")]
position = Vector2(215, 64)
[node name="StaticBody2D" type="StaticBody2D" parent="."]
@@ -480,4 +482,36 @@ position = Vector2(0, -7.76443)
shape = SubResource("RectangleShape2D_lbd3t")
debug_color = Color(0.31865, 0.625237, 0, 0.42)
[node name="Coins" type="Node" parent="."]
[node name="Coin" parent="Coins" instance=ExtResource("11_v5ca1")]
position = Vector2(69, 59)
metadata/_edit_group_ = true
[node name="Coin3" parent="Coins" instance=ExtResource("11_v5ca1")]
position = Vector2(4, -4)
metadata/_edit_group_ = true
[node name="Coin4" parent="Coins" instance=ExtResource("11_v5ca1")]
position = Vector2(277, -8)
metadata/_edit_group_ = true
[node name="Coin6" parent="Coins" instance=ExtResource("11_v5ca1")]
position = Vector2(385, 58)
metadata/_edit_group_ = true
[node name="Coin5" parent="Coins" instance=ExtResource("11_v5ca1")]
position = Vector2(246, -16)
metadata/_edit_group_ = true
[node name="Coin2" parent="Coins" instance=ExtResource("11_v5ca1")]
position = Vector2(486, 25)
metadata/_edit_group_ = true
[node name="BadGuys" type="Node" parent="."]
[node name="BadGuy" parent="BadGuys" instance=ExtResource("12_18k5f")]
position = Vector2(359, 60)
metadata/_edit_group_ = true
[connection signal="body_entered" from="Area2D" to="Area2D" method="_on_body_entered"]