Add coins, enemy slime, and level reset.

This commit is contained in:
CatherineHoang committed 2026-07-27 21:13:39 -04:00
1 parent 8f29753f2e
commit 0c52a8d411
36 files changed
+970 -41

No files matched your search

+2
View File
@@ -20,3 +20,5 @@ position = Vector2(-2.9999998, -1.9999999)
rotation = 3.1415927
scale = Vector2(0.08, 0.08)
texture = ExtResource("2_oduel")
[connection signal="area_entered" from="." to="." method="_on_body_entered"]
+7
View File
@@ -0,0 +1,7 @@
class_name Coin extends Area2D
signal coinCollectedSignal(body,coin)
func _on_body_entered(body: Node2D):
if body is Player:
print("player hit coin")
coinCollectedSignal.emit(body,self)
+1
View File
@@ -0,0 +1 @@
uid://ckjfv5xy1he2u
+116
View File
@@ -0,0 +1,116 @@
[gd_scene format=3 uid="uid://0d4qe2gqj0g7"]
[ext_resource type="Script" uid="uid://ckjfv5xy1he2u" path="res://Scenes/coin.gd" id="1_2qo34"]
[ext_resource type="Texture2D" uid="uid://cwwd4so0n5pvj" path="res://Assets/Pickups/coin.png" id="2_jgi06"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_sgwqp"]
size = Vector2(10, 4)
[sub_resource type="AtlasTexture" id="AtlasTexture_g537i"]
atlas = ExtResource("2_jgi06")
region = Rect2(0, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_h2p6v"]
atlas = ExtResource("2_jgi06")
region = Rect2(16, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_ffmqm"]
atlas = ExtResource("2_jgi06")
region = Rect2(32, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_81h6x"]
atlas = ExtResource("2_jgi06")
region = Rect2(48, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_qbp07"]
atlas = ExtResource("2_jgi06")
region = Rect2(64, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_2l7mo"]
atlas = ExtResource("2_jgi06")
region = Rect2(80, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_q30xt"]
atlas = ExtResource("2_jgi06")
region = Rect2(96, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_7w2r2"]
atlas = ExtResource("2_jgi06")
region = Rect2(112, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_tthw5"]
atlas = ExtResource("2_jgi06")
region = Rect2(128, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_6pu15"]
atlas = ExtResource("2_jgi06")
region = Rect2(144, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_vgc30"]
atlas = ExtResource("2_jgi06")
region = Rect2(160, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_qtgto"]
atlas = ExtResource("2_jgi06")
region = Rect2(176, 0, 16, 16)
[sub_resource type="SpriteFrames" id="SpriteFrames_oov8j"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_g537i")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_h2p6v")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ffmqm")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_81h6x")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_qbp07")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_2l7mo")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_q30xt")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_7w2r2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tthw5")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_6pu15")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_vgc30")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_qtgto")
}],
"loop": 1,
"name": &"coin_twirl",
"speed": 12.0
}]
[node name="coin" type="Area2D" unique_id=1463876970]
script = ExtResource("1_2qo34")
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=282956551]
scale = Vector2(-1.0499984, 2.3999982)
shape = SubResource("RectangleShape2D_sgwqp")
debug_color = Color(0.9064841, 0.22817236, 0.5106338, 0.41960785)
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=1656877505]
texture_filter = 1
scale = Vector2(1.0200001, 0.9375)
sprite_frames = SubResource("SpriteFrames_oov8j")
animation = &"coin_twirl"
autoplay = "coin_twirl"
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
+93 -10
View File
@@ -1,11 +1,17 @@
[gd_scene format=4 uid="uid://bportqr2j3d7s"]
[ext_resource type="Script" uid="uid://cvrssvw6p8myl" path="res://Scripts/game.gd" id="1_wrm1d"]
[ext_resource type="Script" uid="uid://bfh1ec3bb5oki" path="res://Scripts/scene_manager.gd" id="2_3dryh"]
[ext_resource type="Texture2D" uid="uid://dca0bekdpu84" path="res://Assets/Environment/BG/sky.png" id="2_h4fw4"]
[ext_resource type="Texture2D" uid="uid://fdttdiukun15" path="res://Assets/Environment/Terrain (32x32).png" id="2_i6g32"]
[ext_resource type="PackedScene" uid="uid://dyb6tnhpivflf" path="res://Scenes/trigger.tscn" id="3_i6g32"]
[ext_resource type="Texture2D" uid="uid://cg22tty2vuet8" path="res://Assets/Environment/BG/midground.png" id="3_ldgsr"]
[ext_resource type="Texture2D" uid="uid://c7bikbpg5swtd" path="res://Assets/Environment/Veges/veg_32x32.png" id="3_v158k"]
[ext_resource type="PackedScene" uid="uid://b5y6rb2t0eaqr" path="res://Scenes/crate.tscn" id="3_wowpa"]
[ext_resource type="Texture2D" uid="uid://dl14otm4thnq2" path="res://Assets/Environment/Veges/mushroom_32x64.png" id="4_h4fw4"]
[ext_resource type="Texture2D" uid="uid://b73qg48wsqvai" path="res://Assets/Environment/BG/foreground.png" id="4_o5yvi"]
[ext_resource type="PackedScene" uid="uid://en40721f6qwj" path="res://Scenes/player.tscn" id="4_wowpa"]
[ext_resource type="PackedScene" uid="uid://0d4qe2gqj0g7" path="res://Scenes/coin.tscn" id="12_rku1e"]
[ext_resource type="PackedScene" uid="uid://cirhfajnm0tgv" path="res://Scenes/slime.tscn" id="13_rfjv2"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_1l0tm"]
texture = ExtResource("2_i6g32")
@@ -356,28 +362,79 @@ texture_region_size = Vector2i(32, 32)
16:4/0/terrains_peering_bit/left_side = 0
16:4/0/terrains_peering_bit/top_side = 0
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_ldgsr"]
texture = ExtResource("3_v158k")
texture_region_size = Vector2i(32, 32)
0:0/0 = 0
0:0/0/terrain_set = 0
0:0/0/terrain = 1
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_o5yvi"]
texture = ExtResource("4_h4fw4")
texture_region_size = Vector2i(32, 32)
0:0/0 = 0
0:0/0/terrain_set = 0
0:0/0/terrains_peering_bit/bottom_side = 1
0:1/0 = 0
0:1/0/terrain_set = 0
0:1/0/terrain = 1
0:1/0/terrains_peering_bit/top_side = 1
[sub_resource type="TileSet" id="TileSet_v158k"]
tile_size = Vector2i(32, 32)
physics_layer_0/collision_layer = 1
terrain_set_0/mode = 0
terrain_set_0/terrain_0/name = "LeafyGreen"
terrain_set_0/terrain_0/color = Color(0.5, 0.34375, 0.25, 1)
terrain_set_0/terrain_1/name = "Veg"
terrain_set_0/terrain_1/color = Color(0.5, 0.4375, 0.25, 1)
sources/0 = SubResource("TileSetAtlasSource_1l0tm")
sources/1 = SubResource("TileSetAtlasSource_ldgsr")
sources/2 = SubResource("TileSetAtlasSource_o5yvi")
[sub_resource type="RectangleShape2D" id="RectangleShape2D_2poj3"]
[node name="Game" type="Node2D" unique_id=1651082265]
script = ExtResource("1_wrm1d")
[node name="bg" type="Node2D" parent="." unique_id=511849296]
[node name="sky" type="Parallax2D" parent="bg" unique_id=377970151]
repeat_size = Vector2(480, 270)
[node name="Sprite2D" type="Sprite2D" parent="bg/sky" unique_id=41190636]
texture = ExtResource("2_h4fw4")
offset = Vector2(240, 135)
[node name="midground" type="Parallax2D" parent="bg" unique_id=727091655]
texture_filter = 1
scroll_scale = Vector2(1.05, 1)
repeat_size = Vector2(420, 0)
[node name="Sprite2D" type="Sprite2D" parent="bg/midground" unique_id=348870820]
texture = ExtResource("3_ldgsr")
offset = Vector2(240, 200)
[node name="foreground" type="Parallax2D" parent="bg" unique_id=1915745737]
texture_filter = 1
scroll_scale = Vector2(1.5, 1)
repeat_size = Vector2(480, 0)
[node name="Sprite2D" type="Sprite2D" parent="bg/foreground" unique_id=814408590]
texture = ExtResource("4_o5yvi")
offset = Vector2(240, 260)
[node name="TileMapLayer" type="TileMapLayer" parent="." unique_id=1853393222]
tile_map_data = PackedByteArray("AAAOAA4AAAAPAAQAAAAPAA4AAAABAAQAAAAQAA4AAAABAAQAAAARAA4AAAABAAQAAAASAA4AAAAQAAQAAAANABEAAAABAAAAAAAOABEAAAABAAAAAAANABIAAAAHAAAAAAAOABIAAAAGAAAAAAAPABIAAAAGAAAAAAAPABEAAAABAAAAAAALAA8AAAACAAAAAAALABAAAAAGAAEAAAAMABAAAAACAAAAAAAQABEAAAACAAAAAAAQABIAAAAGAAEAAAARABIAAAACAAAAAAATABMAAAAEAAQAAAAVABIAAAAAAAAAAAAWABIAAAAHAAEAAAAWABEAAAAAAAAAAAAVAA4AAAAPAAQAAAAWAA4AAAAKAAQAAAAWAA0AAAAAAAAAAAAXAA0AAAAJAAMAAAAYAA0AAAAQAAQAAAAXAA4AAAACAAIAAAAXABEAAAABAAAAAAAXABIAAAAGAAAAAAAVABMAAAAAAAIAAAAWABMAAAABAAIAAAAXABMAAAABAAIAAAAYABMAAAACAAIAAAAYABIAAAACAAEAAAAYABEAAAAJAAMAAAAZABAAAAAAAAAAAAAaABAAAAAGAAAAAAAZABEAAAAKAAQAAAAaABEAAAACAAIAAAAaAA8AAAAAAAAAAAAbAA8AAAACAAAAAAAbABAAAAACAAIAAAARABMAAAACAAIAAAAQABMAAAABAAIAAAAPABMAAAABAAIAAAAOABMAAAABAAIAAAALABEAAAABAAIAAAAMABEAAAAQAAEAAAAMABIAAAAAAAIAAAANABMAAAAAAAIAAAAKABAAAAAHAAAAAAAKABEAAAAAAAIAAAAJABAAAAAAAAIAAAAKAA8AAAABAAAAAAAJAA8AAAAAAAAAAAA=")
texture_filter = 1
position = Vector2(-191, -185)
tile_map_data = PackedByteArray("AAAOAA4AAAAPAAQAAAAPAA4AAAABAAQAAAAQAA4AAAABAAQAAAARAA4AAAABAAQAAAASAA4AAAAQAAQAAAANABEAAAABAAAAAAAOABEAAAABAAAAAAANABIAAAAHAAAAAAAOABIAAAAGAAAAAAAPABIAAAAGAAAAAAAPABEAAAABAAAAAAALAA8AAAACAAAAAAALABAAAAAGAAEAAAAMABAAAAACAAAAAAAQABEAAAACAAAAAAAQABIAAAAGAAEAAAARABIAAAACAAAAAAATABMAAAAEAAQAAAAVABIAAAAAAAAAAAAWABIAAAAHAAEAAAAWABEAAAAAAAAAAAAVAA4AAAAPAAQAAAAWAA4AAAAKAAQAAAAWAA0AAAAAAAAAAAAXAA0AAAAJAAMAAAAYAA0AAAAQAAQAAAAXAA4AAAACAAIAAAAXABEAAAABAAAAAAAXABIAAAAGAAAAAAAVABMAAAAAAAIAAAAWABMAAAABAAIAAAAXABMAAAABAAIAAAAYABMAAAACAAIAAAAYABIAAAACAAEAAAAYABEAAAAJAAMAAAAZABAAAAAAAAAAAAAaABAAAAAGAAAAAAAZABEAAAAKAAQAAAAaABEAAAACAAIAAAAaAA8AAAAAAAAAAAAbAA8AAAACAAAAAAAbABAAAAACAAIAAAARABMAAAACAAIAAAAQABMAAAABAAIAAAAPABMAAAABAAIAAAAOABMAAAABAAIAAAALABEAAAABAAIAAAAMABEAAAAQAAEAAAAMABIAAAAAAAIAAAANABMAAAAAAAIAAAAKABAAAAAHAAAAAAAKABEAAAAAAAIAAAAJABAAAAAAAAIAAAAKAA8AAAABAAAAAAAJAA8AAAAAAAAAAAAYAAwAAQAAAAAAAAAPABAAAgAAAAEAAAAKAA4AAQAAAAAAAAAPAA8AAgAAAAAAAAATABIAAQAAAAAAAAA=")
tile_set = SubResource("TileSet_v158k")
[node name="SceneManager" type="Node2D" parent="." unique_id=1701867043]
position = Vector2(-191, -185)
script = ExtResource("2_3dryh")
[node name="Floor" type="StaticBody2D" parent="." unique_id=1930890804]
position = Vector2(510, 308)
position = Vector2(319, 123)
scale = Vector2(3.880005, 1)
metadata/_edit_group_ = true
@@ -385,7 +442,7 @@ metadata/_edit_group_ = true
shape = SubResource("RectangleShape2D_2poj3")
[node name="Floor4" type="StaticBody2D" parent="." unique_id=41291254]
position = Vector2(630, 305)
position = Vector2(439, 120)
scale = Vector2(3.880005, 1)
metadata/_edit_group_ = true
@@ -393,7 +450,7 @@ metadata/_edit_group_ = true
shape = SubResource("RectangleShape2D_2poj3")
[node name="Floor2" type="StaticBody2D" parent="." unique_id=1987202329]
position = Vector2(818.00006, 256)
position = Vector2(627.00006, 71)
scale = Vector2(3.880005, 1)
metadata/_edit_group_ = true
@@ -401,7 +458,7 @@ metadata/_edit_group_ = true
shape = SubResource("RectangleShape2D_2poj3")
[node name="Floor3" type="StaticBody2D" parent="." unique_id=1726195228]
position = Vector2(753.99994, 279)
position = Vector2(562.99994, 94)
rotation = -0.69889295
scale = Vector2(3.880005, 1)
metadata/_edit_group_ = true
@@ -410,12 +467,16 @@ metadata/_edit_group_ = true
shape = SubResource("RectangleShape2D_2poj3")
[node name="Trigger" parent="." unique_id=1055766094 instance=ExtResource("3_i6g32")]
position = Vector2(634, 534)
position = Vector2(449, 311)
[node name="Player" parent="." unique_id=478864706 instance=ExtResource("4_wowpa")]
position = Vector2(538.00006, 420)
position = Vector2(347.00006, 235)
[node name="Camera2D" type="Camera2D" parent="Player" unique_id=1158692498]
offset = Vector2(0, -60)
[node name="Crates" type="Node2D" parent="." unique_id=799685623]
position = Vector2(-191, -185)
[node name="Crate" parent="Crates" unique_id=38246509 instance=ExtResource("3_wowpa")]
position = Vector2(643, 387)
@@ -424,6 +485,28 @@ position = Vector2(643, 387)
position = Vector2(716, 382)
[node name="Crate" parent="." unique_id=990352720 instance=ExtResource("3_wowpa")]
position = Vector2(585, 432)
position = Vector2(394, 247)
[node name="Coins" type="Node2D" parent="." unique_id=218739547]
[node name="coin" parent="Coins" unique_id=1463876970 instance=ExtResource("12_rku1e")]
position = Vector2(284, 257)
[node name="coin2" parent="Coins" unique_id=572764533 instance=ExtResource("12_rku1e")]
position = Vector2(569, 219)
[node name="coin3" parent="Coins" unique_id=947271598 instance=ExtResource("12_rku1e")]
position = Vector2(534, 350)
[node name="Enemies" type="Node2D" parent="." unique_id=1647071497]
[node name="slime" parent="Enemies" unique_id=469808451 instance=ExtResource("13_rfjv2")]
position = Vector2(304, 250)
[node name="slime2" parent="Enemies" unique_id=1262992036 instance=ExtResource("13_rfjv2")]
position = Vector2(551, 219)
[node name="slime3" parent="Enemies" unique_id=1319056782 instance=ExtResource("13_rfjv2")]
position = Vector2(554, 348)
[connection signal="areaTriggerSignal" from="Trigger" to="." method="_on_trigger"]
+119 -11
View File
@@ -3,8 +3,10 @@
[ext_resource type="Script" uid="uid://cq2vf132xjtli" path="res://Scripts/player.gd" id="1_v0iea"]
[ext_resource type="Texture2D" uid="uid://dr3u0hb58tj6x" path="res://Assets/Player/Idle/Player Idle 48x48.png" id="2_cvnsp"]
[ext_resource type="Texture2D" uid="uid://edtnvpru6i3b" path="res://Assets/Player/Charging/Player Punch 64x64.png" id="2_fkybt"]
[ext_resource type="Texture2D" uid="uid://dv3636ow2ps4y" path="res://Assets/Player/Dead/Player Death 64x64.png" id="3_3smsa"]
[ext_resource type="Texture2D" uid="uid://cl4as81xv56wq" path="res://Assets/Player/Run/player run 48x48.png" id="3_6t5aa"]
[ext_resource type="Texture2D" uid="uid://itpuf1wcu10i" path="res://Assets/Player/Jump_Fall/player jump 48x48.png" id="3_vgqql"]
[ext_resource type="Texture2D" uid="uid://4xlu4usnkkhq" path="res://Assets/Player/Hurt/Player Hurt 48x48.png" id="5_8erm5"]
[sub_resource type="CircleShape2D" id="CircleShape2D_ebmjs"]
@@ -12,10 +14,66 @@
atlas = ExtResource("2_fkybt")
region = Rect2(128, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_y6uwr"]
atlas = ExtResource("3_3smsa")
region = Rect2(0, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_83xs0"]
atlas = ExtResource("3_3smsa")
region = Rect2(48, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_ypfnu"]
atlas = ExtResource("3_3smsa")
region = Rect2(96, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_xuaoq"]
atlas = ExtResource("3_3smsa")
region = Rect2(144, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_wohnl"]
atlas = ExtResource("3_3smsa")
region = Rect2(192, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_36dho"]
atlas = ExtResource("3_3smsa")
region = Rect2(240, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_yh6i2"]
atlas = ExtResource("3_3smsa")
region = Rect2(288, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_nv4vc"]
atlas = ExtResource("3_3smsa")
region = Rect2(336, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_8gxox"]
atlas = ExtResource("3_3smsa")
region = Rect2(384, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_11gg7"]
atlas = ExtResource("3_3smsa")
region = Rect2(432, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_bi64h"]
atlas = ExtResource("3_vgqql")
region = Rect2(96, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_qpa8y"]
atlas = ExtResource("5_8erm5")
region = Rect2(0, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_sbwqj"]
atlas = ExtResource("5_8erm5")
region = Rect2(48, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_xwi16"]
atlas = ExtResource("5_8erm5")
region = Rect2(96, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_sweqm"]
atlas = ExtResource("5_8erm5")
region = Rect2(144, 0, 48, 48)
[sub_resource type="AtlasTexture" id="AtlasTexture_6t5aa"]
atlas = ExtResource("2_cvnsp")
region = Rect2(0, 0, 48, 48)
@@ -114,20 +172,72 @@ animations = [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_2ijsl")
}],
"loop": false,
"loop": 0,
"name": &"charging",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_y6uwr")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_83xs0")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ypfnu")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xuaoq")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_wohnl")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_36dho")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_yh6i2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_nv4vc")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_8gxox")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_11gg7")
}],
"loop": 0,
"name": &"dead",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_bi64h")
}],
"loop": false,
"loop": 0,
"name": &"falling",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_qpa8y")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_sbwqj")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xwi16")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_sweqm")
}],
"loop": 0,
"name": &"hurt",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_6t5aa")
}, {
"duration": 1.0,
@@ -157,7 +267,7 @@ animations = [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_pu2lt")
}],
"loop": true,
"loop": 1,
"name": &"idle",
"speed": 12.0
}, {
@@ -168,7 +278,7 @@ animations = [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_wpjfl")
}],
"loop": false,
"loop": 0,
"name": &"jumping",
"speed": 12.0
}, {
@@ -197,7 +307,7 @@ animations = [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_l6n3p")
}],
"loop": true,
"loop": 1,
"name": &"running",
"speed": 12.0
}, {
@@ -211,7 +321,7 @@ animations = [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_vfarp")
}],
"loop": false,
"loop": 0,
"name": &"shoving",
"speed": 12.0
}]
@@ -232,18 +342,16 @@ target_position = Vector2(17.073172, 0)
target_position = Vector2(-17.073172, 0)
[node name="RightSpawn" type="Marker2D" parent="." unique_id=1358832037]
position = Vector2(11.585366, -8.536586)
position = Vector2(11.585366, -1.5853653)
[node name="LeftSpawn" type="Marker2D" parent="." unique_id=1880777693]
position = Vector2(-12.195123, -8.536585)
position = Vector2(-12.195123, -1.5853643)
[node name="PlayerGraphic" type="AnimatedSprite2D" parent="." unique_id=411274624]
texture_filter = 1
position = Vector2(0, -6.0975614)
sprite_frames = SubResource("SpriteFrames_ukyrk")
animation = &"shoving"
animation = &"dead"
autoplay = "idle"
frame = 2
frame_progress = 1.0
[connection signal="animation_finished" from="PlayerGraphic" to="." method="_on_animation_finished"]
+74
View File
@@ -0,0 +1,74 @@
[gd_scene format=3 uid="uid://cirhfajnm0tgv"]
[ext_resource type="Texture2D" uid="uid://dm8y5y1wgcatm" path="res://Assets/Enemy/Slime/slime_purple.png" id="1_jokqx"]
[ext_resource type="Script" uid="uid://0upi64wxvgdi" path="res://Scripts/slime.gd" id="1_swwnm"]
[sub_resource type="CircleShape2D" id="CircleShape2D_oov8j"]
[sub_resource type="AtlasTexture" id="AtlasTexture_swwnm"]
atlas = ExtResource("1_jokqx")
region = Rect2(0, 24, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_aiwxb"]
atlas = ExtResource("1_jokqx")
region = Rect2(24, 24, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_paq7w"]
atlas = ExtResource("1_jokqx")
region = Rect2(48, 24, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_f4si1"]
atlas = ExtResource("1_jokqx")
region = Rect2(72, 24, 24, 24)
[sub_resource type="SpriteFrames" id="SpriteFrames_65ky4"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_swwnm")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_aiwxb")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_paq7w")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_f4si1")
}],
"loop": 1,
"name": &"idle",
"speed": 12.0
}]
[node name="slime" type="Area2D" unique_id=469808451 groups=["shootable"]]
script = ExtResource("1_swwnm")
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1923400761]
shape = SubResource("CircleShape2D_oov8j")
debug_color = Color(0.98289496, 0, 0.36229762, 0.41960785)
[node name="slimeGraphic" type="AnimatedSprite2D" parent="." unique_id=1897637737]
texture_filter = 1
position = Vector2(0, -2)
sprite_frames = SubResource("SpriteFrames_65ky4")
animation = &"idle"
autoplay = "idle"
frame = 1
frame_progress = 0.5775934
[node name="rightCast" type="RayCast2D" parent="." unique_id=543027424]
target_position = Vector2(15, 0)
[node name="rightDownCast" type="RayCast2D" parent="." unique_id=2087514097]
position = Vector2(9, 0)
target_position = Vector2(0, 15)
[node name="leftDownCast" type="RayCast2D" parent="." unique_id=1074540411]
position = Vector2(-9, 0)
target_position = Vector2(0, 15)
[node name="leftCast" type="RayCast2D" parent="." unique_id=994735907]
target_position = Vector2(-15, 0)
[connection signal="body_entered" from="." to="." method="_on_body_entered"]