player death, player hurt, ui
This commit is contained in:
1 parent
8bb10b79a8
commit
4389b9804c
14 files changed
+432
-81
No files matched your search
@@ -20,4 +20,5 @@ rotation = 3.14089
|
||||
scale = Vector2(0.0794906, 0.0794906)
|
||||
texture = ExtResource("2_0y61d")
|
||||
|
||||
[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=16 format=4 uid="uid://r8jj43l4t6is"]
|
||||
[gd_scene load_steps=17 format=4 uid="uid://r8jj43l4t6is"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://di3tq4f0xmdqc" path="res://scenes/crate.tscn" id="1_tfj4n"]
|
||||
[ext_resource type="PackedScene" uid="uid://bissd2c653cg5" path="res://scenes/ui.tscn" id="2_5absq"]
|
||||
[ext_resource type="Script" path="res://scripts/trigger.gd" id="3_hm0br"]
|
||||
[ext_resource type="Texture2D" uid="uid://ka2skiy8uj8c" path="res://assets/graphics/terrains/backgrounds/forestbackground (1).png" id="3_jlqfv"]
|
||||
[ext_resource type="PackedScene" uid="uid://dcbk086hhrn7y" path="res://scenes/player.tscn" id="3_oy8j2"]
|
||||
@@ -388,6 +389,10 @@ radius = 29.0
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("6_1kka5")
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="ui" parent="CanvasLayer" instance=ExtResource("2_5absq")]
|
||||
|
||||
[node name="Background" type="Parallax2D" parent="."]
|
||||
scroll_scale = Vector2(0.5, 1)
|
||||
repeat_size = Vector2(320, 0)
|
||||
@@ -446,15 +451,15 @@ position = Vector2(196, 115)
|
||||
rotation = 2.0228
|
||||
|
||||
[node name="RigidBody2D2" parent="crates" instance=ExtResource("1_tfj4n")]
|
||||
position = Vector2(317, 133)
|
||||
position = Vector2(353, 143)
|
||||
|
||||
[node name="RigidBody2D3" parent="crates" instance=ExtResource("1_tfj4n")]
|
||||
position = Vector2(389, 49)
|
||||
position = Vector2(406, 140)
|
||||
|
||||
[node name="coins" type="Node2D" parent="."]
|
||||
|
||||
[node name="Area2D" parent="coins" instance=ExtResource("10_tkwbv")]
|
||||
position = Vector2(288, 149)
|
||||
position = Vector2(307, 150)
|
||||
|
||||
[node name="enemies" type="Node2D" parent="."]
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
[gd_scene load_steps=15 format=4 uid="uid://ctbk75ohtgn52"]
|
||||
[gd_scene load_steps=17 format=4 uid="uid://ctbk75ohtgn52"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/scene_manager.gd" id="1_nno8q"]
|
||||
[ext_resource type="Texture2D" uid="uid://ka2skiy8uj8c" path="res://assets/graphics/terrains/backgrounds/forestbackground (1).png" id="2_2sxt8"]
|
||||
[ext_resource type="PackedScene" uid="uid://bissd2c653cg5" path="res://scenes/ui.tscn" id="2_6u8nu"]
|
||||
[ext_resource type="Texture2D" uid="uid://5uu4qwac4co" path="res://assets/graphics/terrains/backgrounds/skystrip.png" id="3_q3nnd"]
|
||||
[ext_resource type="Texture2D" uid="uid://dvw2k2s2t1s7i" path="res://assets/graphics/terrains/backgrounds/midtrees.png" id="4_pn8y7"]
|
||||
[ext_resource type="Texture2D" uid="uid://de4acrj4jm3cw" path="res://assets/graphics/objects/planedown.png" id="5_x7x8v"]
|
||||
@@ -10,6 +11,7 @@
|
||||
[ext_resource type="Script" path="res://scripts/trigger.gd" id="8_1l7lm"]
|
||||
[ext_resource type="PackedScene" uid="uid://di3tq4f0xmdqc" path="res://scenes/crate.tscn" id="9_akhlr"]
|
||||
[ext_resource type="PackedScene" uid="uid://djcmk4sjeejcg" path="res://scenes/coin.tscn" id="10_puv42"]
|
||||
[ext_resource type="PackedScene" uid="uid://dc3up6wvi521j" path="res://scenes/badguy.tscn" id="12_jdqy2"]
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_pgbim"]
|
||||
texture = ExtResource("6_exrs3")
|
||||
@@ -387,6 +389,10 @@ radius = 29.0
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("1_nno8q")
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="ui" parent="CanvasLayer" instance=ExtResource("2_6u8nu")]
|
||||
|
||||
[node name="Background" type="Parallax2D" parent="."]
|
||||
scroll_scale = Vector2(0.5, 1)
|
||||
repeat_size = Vector2(320, 0)
|
||||
@@ -427,7 +433,7 @@ position = Vector2(4, 42)
|
||||
shape = SubResource("WorldBoundaryShape2D_acecj")
|
||||
|
||||
[node name="CharacterBody2D" parent="." instance=ExtResource("7_6hxr3")]
|
||||
position = Vector2(253, 89)
|
||||
position = Vector2(119, 53)
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="."]
|
||||
position = Vector2(612, -100)
|
||||
@@ -455,5 +461,19 @@ position = Vector2(406, 145)
|
||||
[node name="Area2D" parent="coins" instance=ExtResource("10_puv42")]
|
||||
position = Vector2(288, 149)
|
||||
|
||||
[node name="Area2D2" parent="coins" instance=ExtResource("10_puv42")]
|
||||
position = Vector2(570, -9)
|
||||
|
||||
[node name="Area2D3" parent="coins" instance=ExtResource("10_puv42")]
|
||||
position = Vector2(373, 57)
|
||||
|
||||
[node name="enemies" type="Node2D" parent="."]
|
||||
|
||||
[node name="Area2D" parent="enemies" instance=ExtResource("12_jdqy2")]
|
||||
position = Vector2(199, 86)
|
||||
|
||||
[node name="Area2D2" parent="enemies" instance=ExtResource("12_jdqy2")]
|
||||
position = Vector2(415, 53)
|
||||
|
||||
[connection signal="areaTrigger" from="Area2D" to="." method="_on_trigger"]
|
||||
[connection signal="body_entered" from="Area2D" to="Area2D" method="_on_body_entered"]
|
||||
@@ -1,12 +1,70 @@
|
||||
[gd_scene load_steps=28 format=3 uid="uid://dcbk086hhrn7y"]
|
||||
[gd_scene load_steps=44 format=3 uid="uid://dcbk086hhrn7y"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/charactercontroller.gd" id="1_6alft"]
|
||||
[ext_resource type="Texture2D" uid="uid://brk4npndc5woq" path="res://assets/graphics/player/death/Player Death 64x64.png" id="2_hk34k"]
|
||||
[ext_resource type="Texture2D" uid="uid://c8esv4rqrll0u" path="res://assets/graphics/player/idle/Player Idle 48x48.png" id="2_itql4"]
|
||||
[ext_resource type="Texture2D" uid="uid://yqw4w6dfvdkw" path="res://assets/graphics/player/hurt/Player Hurt 48x48.png" id="3_3i7wk"]
|
||||
[ext_resource type="Texture2D" uid="uid://cpksf8fvm4k26" path="res://assets/graphics/player/jump/player jump 48x48.png" id="3_fjlo4"]
|
||||
[ext_resource type="Texture2D" uid="uid://lum1fe47ggoy" path="res://assets/graphics/player/run/player run 48x48.png" id="3_fp3hq"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_qrixx"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_nobr7"]
|
||||
atlas = ExtResource("2_hk34k")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_uycsx"]
|
||||
atlas = ExtResource("2_hk34k")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ytgcw"]
|
||||
atlas = ExtResource("2_hk34k")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_60hx1"]
|
||||
atlas = ExtResource("2_hk34k")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_podt1"]
|
||||
atlas = ExtResource("2_hk34k")
|
||||
region = Rect2(192, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_vlehs"]
|
||||
atlas = ExtResource("2_hk34k")
|
||||
region = Rect2(240, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_brhlx"]
|
||||
atlas = ExtResource("2_hk34k")
|
||||
region = Rect2(288, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3ui1j"]
|
||||
atlas = ExtResource("2_hk34k")
|
||||
region = Rect2(336, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_kvxru"]
|
||||
atlas = ExtResource("2_hk34k")
|
||||
region = Rect2(384, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_uqe8x"]
|
||||
atlas = ExtResource("2_hk34k")
|
||||
region = Rect2(432, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_fva2s"]
|
||||
atlas = ExtResource("3_3i7wk")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_crb4x"]
|
||||
atlas = ExtResource("3_3i7wk")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3g2wg"]
|
||||
atlas = ExtResource("3_3i7wk")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_cacvb"]
|
||||
atlas = ExtResource("3_3i7wk")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_xei83"]
|
||||
atlas = ExtResource("2_itql4")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
@@ -95,6 +153,58 @@ region = Rect2(336, 0, 48, 48)
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_nobr7")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_uycsx")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ytgcw")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_60hx1")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_podt1")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_vlehs")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_brhlx")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_3ui1j")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_kvxru")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_uqe8x")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"death",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_fva2s")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_crb4x")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_3g2wg")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_cacvb")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"hurt",
|
||||
"speed": 12.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_xei83")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
@@ -199,5 +309,7 @@ offset = Vector2(0, -50)
|
||||
texture_filter = 1
|
||||
position = Vector2(0, -7)
|
||||
sprite_frames = SubResource("SpriteFrames_yi1g3")
|
||||
animation = &"run"
|
||||
animation = &"death"
|
||||
autoplay = "jump"
|
||||
|
||||
[connection signal="animation_finished" from="AnimatedSprite2D" to="." method="_on_animation_finished"]
|
||||
@@ -0,0 +1,48 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://bissd2c653cg5"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/ui.gd" id="1_1f4nb"]
|
||||
|
||||
[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_1f4nb")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 10
|
||||
anchor_right = 1.0
|
||||
offset_bottom = 23.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