damage, dying, custom resources, simple UI
This commit is contained in:
1 parent
fd6ad5e001
commit
1a4f030097
16 files changed
+336
-13
No files matched your search
@@ -7,6 +7,7 @@
|
||||
[ext_resource type="Script" uid="uid://4hekg0d8n04f" path="res://Scripts/trigger.gd" id="3_wrm1d"]
|
||||
[ext_resource type="PackedScene" uid="uid://dotmw0uwnqv6w" path="res://Scenes/grenade.tscn" id="6_i6g32"]
|
||||
[ext_resource type="PackedScene" uid="uid://rn1d2w3p88sr" path="res://Scenes/slime.tscn" id="7_1l0tm"]
|
||||
[ext_resource type="PackedScene" uid="uid://dwl0ci4ejpmu2" path="res://Scenes/ui.tscn" id="8_v158k"]
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_v158k"]
|
||||
texture = ExtResource("3_1l0tm")
|
||||
@@ -438,5 +439,9 @@ position = Vector2(636, 375)
|
||||
[node name="Slime2" parent="Enemies" unique_id=689767526 instance=ExtResource("7_1l0tm")]
|
||||
position = Vector2(546, 406)
|
||||
|
||||
[node name="UI" type="CanvasLayer" parent="." unique_id=1274660153]
|
||||
|
||||
[node name="Control" parent="UI" unique_id=1504539709 instance=ExtResource("8_v158k")]
|
||||
|
||||
[connection signal="body_entered" from="Area2D" to="Area2D" method="_on_body_entered"]
|
||||
[connection signal="triggerActiveSignal" from="Area2D" to="." method="_on_triggerSignal"]
|
||||
+111
-1
@@ -3,14 +3,72 @@
|
||||
[ext_resource type="Script" uid="uid://btmoyp0rwqmxe" path="res://Scripts/player.gd" id="1_v0iea"]
|
||||
[ext_resource type="Texture2D" uid="uid://dlax6d4nhkl4p" path="res://assets/graphics/player/idle/Player Idle 48x48.png" id="2_cvnsp"]
|
||||
[ext_resource type="Texture2D" uid="uid://cnpsd8q2hqrmp" path="res://assets/graphics/player/jump_fall/player jump 48x48.png" id="2_vgqql"]
|
||||
[ext_resource type="Texture2D" uid="uid://bm2nvpkg1tihf" path="res://assets/graphics/player/dead/Player Death 64x64.png" id="2_x3wgy"]
|
||||
[ext_resource type="Texture2D" uid="uid://bc251ptp8ujsv" path="res://assets/graphics/player/run/player run 48x48.png" id="3_6t5aa"]
|
||||
[ext_resource type="Texture2D" uid="uid://dcd86jsmvvi4m" path="res://assets/graphics/player/hurt/Player Hurt 48x48.png" id="3_fkybt"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_2poj3"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_y6uwr"]
|
||||
atlas = ExtResource("2_x3wgy")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_83xs0"]
|
||||
atlas = ExtResource("2_x3wgy")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ypfnu"]
|
||||
atlas = ExtResource("2_x3wgy")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_xuaoq"]
|
||||
atlas = ExtResource("2_x3wgy")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wohnl"]
|
||||
atlas = ExtResource("2_x3wgy")
|
||||
region = Rect2(192, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_36dho"]
|
||||
atlas = ExtResource("2_x3wgy")
|
||||
region = Rect2(240, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_yh6i2"]
|
||||
atlas = ExtResource("2_x3wgy")
|
||||
region = Rect2(288, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_nv4vc"]
|
||||
atlas = ExtResource("2_x3wgy")
|
||||
region = Rect2(336, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_8gxox"]
|
||||
atlas = ExtResource("2_x3wgy")
|
||||
region = Rect2(384, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_11gg7"]
|
||||
atlas = ExtResource("2_x3wgy")
|
||||
region = Rect2(432, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_olqyp"]
|
||||
atlas = ExtResource("2_vgqql")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_2ijsl"]
|
||||
atlas = ExtResource("3_fkybt")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_p1odr"]
|
||||
atlas = ExtResource("3_fkybt")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_0gysh"]
|
||||
atlas = ExtResource("3_fkybt")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_vfarp"]
|
||||
atlas = ExtResource("3_fkybt")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_6t5aa"]
|
||||
atlas = ExtResource("2_cvnsp")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
@@ -95,6 +153,41 @@ region = Rect2(336, 0, 48, 48)
|
||||
animations = [{
|
||||
"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": false,
|
||||
"name": &"dead",
|
||||
"speed": 9.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_olqyp")
|
||||
}],
|
||||
"loop": false,
|
||||
@@ -103,6 +196,23 @@ animations = [{
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_2ijsl")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_p1odr")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_0gysh")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_vfarp")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"hurt",
|
||||
"speed": 12.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_6t5aa")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
@@ -201,7 +311,7 @@ position = Vector2(-14, -8)
|
||||
texture_filter = 1
|
||||
position = Vector2(0, -6)
|
||||
sprite_frames = SubResource("SpriteFrames_ukyrk")
|
||||
animation = &"idle"
|
||||
animation = &"dead"
|
||||
autoplay = "idle"
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="." unique_id=522635127]
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
[gd_scene format=3 uid="uid://dwl0ci4ejpmu2"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c6hdmgpywednh" path="res://Scripts/ui.gd" id="1_jxero"]
|
||||
|
||||
[node name="Control" type="Control" unique_id=1504539709]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_jxero")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="." unique_id=1721165743]
|
||||
layout_mode = 1
|
||||
anchors_preset = 10
|
||||
anchor_right = 1.0
|
||||
grow_horizontal = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer" unique_id=71460237]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/HBoxContainer" unique_id=1544251315]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="health" type="Label" parent="VBoxContainer/HBoxContainer/MarginContainer" unique_id=623986244]
|
||||
layout_mode = 2
|
||||
text = "HEALTH"
|
||||
|
||||
[node name="MarginContainer2" type="MarginContainer" parent="VBoxContainer/HBoxContainer" unique_id=2101616423]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="time" type="Label" parent="VBoxContainer/HBoxContainer/MarginContainer2" unique_id=596670188]
|
||||
layout_mode = 2
|
||||
text = "TIME"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="MarginContainer3" type="MarginContainer" parent="VBoxContainer/HBoxContainer" unique_id=173654446]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="crates" type="Label" parent="VBoxContainer/HBoxContainer/MarginContainer3" unique_id=1150656356]
|
||||
layout_mode = 2
|
||||
text = "CRATES"
|
||||
horizontal_alignment = 2
|
||||
Reference in new issue
Block a user