player death, player hurt, ui
This commit is contained in:
1 parent
7c292f7cec
commit
b25214ebfe
14 files changed
+446
-102
No files matched your search
@@ -21,4 +21,5 @@ rotation = -3.1402
|
||||
scale = Vector2(0.171023, -0.0779315)
|
||||
texture = ExtResource("2_a2saw")
|
||||
|
||||
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
@@ -1,6 +1,7 @@
|
||||
[gd_scene load_steps=24 format=4 uid="uid://dcmyx5g6dksl8"]
|
||||
[gd_scene load_steps=25 format=4 uid="uid://dcmyx5g6dksl8"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://d1ej2kiy7jcpv" path="res://scenes/crate.tscn" id="1_uivx3"]
|
||||
[ext_resource type="PackedScene" uid="uid://cfmcjh6nskv2e" path="res://scenes/ui.tscn" id="2_gvfd3"]
|
||||
[ext_resource type="Script" path="res://scripts/trigger.gd" id="3_2qbah"]
|
||||
[ext_resource type="PackedScene" uid="uid://b75mow511wmmb" path="res://scenes/player.tscn" id="3_8h5jv"]
|
||||
[ext_resource type="Texture2D" uid="uid://jlbx6yvcmten" path="res://assets/graphics/terrains/backgrounds/forestbackground.png" id="3_umlo6"]
|
||||
@@ -427,6 +428,10 @@ size = Vector2(15, 18)
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("6_n2kp0")
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="ui" parent="CanvasLayer" instance=ExtResource("2_gvfd3")]
|
||||
|
||||
[node name="Background" type="Parallax2D" parent="."]
|
||||
repeat_size = Vector2(320, 0)
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
[gd_scene load_steps=23 format=4 uid="uid://d383o6j0l3d2m"]
|
||||
[gd_scene load_steps=24 format=4 uid="uid://d383o6j0l3d2m"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/scenemanager.gd" id="1_g37ru"]
|
||||
[ext_resource type="Texture2D" uid="uid://jlbx6yvcmten" path="res://assets/graphics/terrains/backgrounds/forestbackground.png" id="2_ehg0h"]
|
||||
[ext_resource type="PackedScene" uid="uid://cfmcjh6nskv2e" path="res://scenes/ui.tscn" id="2_patxi"]
|
||||
[ext_resource type="Texture2D" uid="uid://8kaggg1kilxy" path="res://assets/graphics/terrains/backgrounds/skystrip.png" id="3_8wilj"]
|
||||
[ext_resource type="Texture2D" uid="uid://b3smxb17ijk60" path="res://assets/graphics/terrains/backgrounds/midtrees.png" id="4_qwx2h"]
|
||||
[ext_resource type="Texture2D" uid="uid://btdvc25chjgd" path="res://assets/graphics/terrains/Terrain (32x32).png" id="5_p6mo5"]
|
||||
@@ -426,6 +427,10 @@ size = Vector2(15, 18)
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("1_g37ru")
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="ui" parent="CanvasLayer" instance=ExtResource("2_patxi")]
|
||||
|
||||
[node name="Background" type="Parallax2D" parent="."]
|
||||
repeat_size = Vector2(320, 0)
|
||||
|
||||
@@ -514,6 +519,12 @@ position = Vector2(370, 40)
|
||||
[node name="Area2D2" parent="coins" instance=ExtResource("9_fv1rd")]
|
||||
position = Vector2(400, 40)
|
||||
|
||||
[node name="Area2D4" parent="coins" instance=ExtResource("9_fv1rd")]
|
||||
position = Vector2(464, 85)
|
||||
|
||||
[node name="Area2D5" parent="coins" instance=ExtResource("9_fv1rd")]
|
||||
position = Vector2(276, 80)
|
||||
|
||||
[node name="enemies" type="Node2D" parent="."]
|
||||
|
||||
[node name="Area2D3" type="Area2D" parent="enemies" groups=["enemies"]]
|
||||
|
||||
@@ -1,12 +1,70 @@
|
||||
[gd_scene load_steps=28 format=3 uid="uid://b75mow511wmmb"]
|
||||
[gd_scene load_steps=44 format=3 uid="uid://b75mow511wmmb"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/charactercontroller.gd" id="1_racyk"]
|
||||
[ext_resource type="Texture2D" uid="uid://sdelsqhjm5a5" path="res://assets/graphics/player/death/Player Death 64x64.png" id="2_2t5sp"]
|
||||
[ext_resource type="Texture2D" uid="uid://ceif6mm7m5nqi" path="res://assets/graphics/player/hurt/Player Hurt 48x48.png" id="2_rs8ny"]
|
||||
[ext_resource type="Texture2D" uid="uid://d2gvpgkw8np1c" path="res://assets/graphics/player/idle/Player Idle 48x48.png" id="2_xdqt5"]
|
||||
[ext_resource type="Texture2D" uid="uid://ctneeupm1dwsb" path="res://assets/graphics/player/jump/player jump 48x48.png" id="3_0nv1p"]
|
||||
[ext_resource type="Texture2D" uid="uid://ccxw74sa7kyv" path="res://assets/graphics/player/run/player run 48x48.png" id="3_d2rrr"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_i8a0m"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_bbe3f"]
|
||||
atlas = ExtResource("2_2t5sp")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_1e5du"]
|
||||
atlas = ExtResource("2_2t5sp")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_j0abf"]
|
||||
atlas = ExtResource("2_2t5sp")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_6o4t2"]
|
||||
atlas = ExtResource("2_2t5sp")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_gkmrp"]
|
||||
atlas = ExtResource("2_2t5sp")
|
||||
region = Rect2(192, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_hjsqv"]
|
||||
atlas = ExtResource("2_2t5sp")
|
||||
region = Rect2(240, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_0qj7s"]
|
||||
atlas = ExtResource("2_2t5sp")
|
||||
region = Rect2(288, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_mllfo"]
|
||||
atlas = ExtResource("2_2t5sp")
|
||||
region = Rect2(336, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_4kmyn"]
|
||||
atlas = ExtResource("2_2t5sp")
|
||||
region = Rect2(384, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_nhisu"]
|
||||
atlas = ExtResource("2_2t5sp")
|
||||
region = Rect2(432, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_o5yg8"]
|
||||
atlas = ExtResource("2_rs8ny")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3l8vl"]
|
||||
atlas = ExtResource("2_rs8ny")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_rwn2k"]
|
||||
atlas = ExtResource("2_rs8ny")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_2b7hu"]
|
||||
atlas = ExtResource("2_rs8ny")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_afagl"]
|
||||
atlas = ExtResource("2_xdqt5")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
@@ -95,6 +153,58 @@ region = Rect2(336, 0, 48, 48)
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_bbe3f")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_1e5du")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_j0abf")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_6o4t2")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_gkmrp")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_hjsqv")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_0qj7s")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_mllfo")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_4kmyn")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_nhisu")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"death",
|
||||
"speed": 12.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_o5yg8")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_3l8vl")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_rwn2k")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_2b7hu")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"hurt",
|
||||
"speed": 12.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_afagl")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
@@ -197,7 +307,7 @@ position = Vector2(-10, -5)
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
sprite_frames = SubResource("SpriteFrames_2kykc")
|
||||
animation = &"jump"
|
||||
animation = &"death"
|
||||
autoplay = "jump"
|
||||
frame = 2
|
||||
frame_progress = 1.0
|
||||
|
||||
[connection signal="animation_finished" from="AnimatedSprite2D" to="." method="_on_animation_finished"]
|
||||
@@ -0,0 +1,47 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://cfmcjh6nskv2e"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/ui.gd" id="1_vhyum"]
|
||||
|
||||
[node name="Control" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_vhyum")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 10
|
||||
anchor_right = 1.0
|
||||
grow_horizontal = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="health" type="Label" parent="VBoxContainer/HBoxContainer/MarginContainer"]
|
||||
layout_mode = 2
|
||||
text = "HEALTH"
|
||||
|
||||
[node name="MarginContainer3" type="MarginContainer" parent="VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="timer" type="Label" parent="VBoxContainer/HBoxContainer/MarginContainer3"]
|
||||
layout_mode = 2
|
||||
text = "10"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="MarginContainer2" type="MarginContainer" parent="VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="coins" type="Label" parent="VBoxContainer/HBoxContainer/MarginContainer2"]
|
||||
layout_mode = 2
|
||||
text = "COINS"
|
||||
horizontal_alignment = 2
|
||||
Reference in new issue
Block a user