final week
This commit is contained in:
parent
ebb592415a
commit
a360f8e84f
BIN
assets/graphics/player/death/Player Death 64x64.png
Normal file
BIN
assets/graphics/player/death/Player Death 64x64.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
40
assets/graphics/player/death/Player Death 64x64.png.import
Normal file
40
assets/graphics/player/death/Player Death 64x64.png.import
Normal file
@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bululkhh0pe48"
|
||||
path="res://.godot/imported/Player Death 64x64.png-0c6ff54e7d9aad74b66dce47376541f8.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/graphics/player/death/Player Death 64x64.png"
|
||||
dest_files=["res://.godot/imported/Player Death 64x64.png-0c6ff54e7d9aad74b66dce47376541f8.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
assets/graphics/player/hurt/Player Hurt 48x48.png
Normal file
BIN
assets/graphics/player/hurt/Player Hurt 48x48.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
40
assets/graphics/player/hurt/Player Hurt 48x48.png.import
Normal file
40
assets/graphics/player/hurt/Player Hurt 48x48.png.import
Normal file
@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cvm8klajafilg"
|
||||
path="res://.godot/imported/Player Hurt 48x48.png-a720e51cb19103e76b22ab6c1b81302d.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/graphics/player/hurt/Player Hurt 48x48.png"
|
||||
dest_files=["res://.godot/imported/Player Hurt 48x48.png-a720e51cb19103e76b22ab6c1b81302d.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
@ -58,6 +58,16 @@ Shoot={
|
||||
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":1,"position":Vector2(355, 24),"global_position":Vector2(364, 72),"factor":1.0,"button_index":1,"canceled":false,"pressed":true,"double_click":false,"script":null)
|
||||
]
|
||||
}
|
||||
save={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":78,"key_label":0,"unicode":110,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
load={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":77,"key_label":0,"unicode":109,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[physics]
|
||||
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://bmkh4wsfm3fbq" path="res://scenes/npc_charector.tscn" id="6_p57ef"]
|
||||
[ext_resource type="PackedScene" uid="uid://bp5adp7uhi5e0" path="res://scenes/coin.tscn" id="12_dinhu"]
|
||||
[ext_resource type="PackedScene" uid="uid://dh7cp51oyyl76" path="res://scenes/slime.tscn" id="13_kvuet"]
|
||||
[ext_resource type="PackedScene" uid="uid://c1dgwb1r7e2fg" path="res://scenes/ui.tscn" id="14_trtic"]
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_gee14"]
|
||||
texture = ExtResource("3_u5sy4")
|
||||
@ -442,38 +443,6 @@ texture_filter = 1
|
||||
tile_map_data = PackedByteArray("AAAEABMAAAAAAAIAAAAFABMAAAABAAIAAAAGABMAAAABAAIAAAAHABMAAAABAAIAAAAIABMAAAABAAIAAAAJABMAAAABAAIAAAAKABMAAAABAAIAAAALABMAAAAJAAQAAAAMABMAAAABAAQAAAANABMAAAABAAQAAAAOABMAAAABAAQAAAAPABMAAAABAAQAAAAQABMAAAABAAQAAAARABMAAAABAAQAAAASABMAAAABAAQAAAATABMAAAABAAQAAAAUABMAAAABAAQAAAAVABMAAAABAAQAAAAWABMAAAABAAQAAAAXABMAAAAKAAQAAAAYABMAAAABAAIAAAAZAB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AAAAGAAAAAAANAAoAAAACAAEAAAAMAAoAAAAAAAEAAAAMAAsAAAAAAAIAAAANAAsAAAACAAIAAAASAAcAAAACAAAAAAASAAgAAAACAAIAAAARAAcAAAAAAAAAAAA=")
|
||||
tile_set = SubResource("TileSet_0tnpc")
|
||||
|
||||
[node name="Coins" type="Node2D" parent="." unique_id=252015264]
|
||||
|
||||
[node name="Coin" parent="Coins" unique_id=276927475 instance=ExtResource("12_dinhu")]
|
||||
position = Vector2(575, 551)
|
||||
|
||||
[node name="Coin2" parent="Coins" unique_id=1644658619 instance=ExtResource("12_dinhu")]
|
||||
position = Vector2(624, 505)
|
||||
|
||||
[node name="Coin3" parent="Coins" unique_id=1698396235 instance=ExtResource("12_dinhu")]
|
||||
position = Vector2(466, 514)
|
||||
|
||||
[node name="Coin4" parent="Coins" unique_id=637616183 instance=ExtResource("12_dinhu")]
|
||||
position = Vector2(507, 488)
|
||||
|
||||
[node name="Coin5" parent="Coins" unique_id=1538621726 instance=ExtResource("12_dinhu")]
|
||||
position = Vector2(496, 535)
|
||||
|
||||
[node name="Coin6" parent="Coins" unique_id=1608922508 instance=ExtResource("12_dinhu")]
|
||||
position = Vector2(535, 565)
|
||||
|
||||
[node name="Coin7" parent="Coins" unique_id=227433727 instance=ExtResource("12_dinhu")]
|
||||
position = Vector2(420, 464)
|
||||
|
||||
[node name="Coin8" parent="Coins" unique_id=466741782 instance=ExtResource("12_dinhu")]
|
||||
position = Vector2(610, 514)
|
||||
|
||||
[node name="Coin9" parent="Coins" unique_id=1670069503 instance=ExtResource("12_dinhu")]
|
||||
position = Vector2(458, 477)
|
||||
|
||||
[node name="Coin10" parent="Coins" unique_id=463607762 instance=ExtResource("12_dinhu")]
|
||||
position = Vector2(558, 494)
|
||||
|
||||
[node name="Player" parent="." unique_id=401513938 instance=ExtResource("3_iywne")]
|
||||
position = Vector2(509, 420)
|
||||
|
||||
@ -522,6 +491,38 @@ shape = SubResource("WorldBoundaryShape2D_lbhrr")
|
||||
[node name="NPCCharector" parent="." unique_id=912777798 instance=ExtResource("6_p57ef")]
|
||||
position = Vector2(460, 422)
|
||||
|
||||
[node name="Coins" type="Node2D" parent="." unique_id=252015264]
|
||||
|
||||
[node name="Coin" parent="Coins" unique_id=276927475 instance=ExtResource("12_dinhu")]
|
||||
position = Vector2(575, 551)
|
||||
|
||||
[node name="Coin2" parent="Coins" unique_id=1644658619 instance=ExtResource("12_dinhu")]
|
||||
position = Vector2(624, 505)
|
||||
|
||||
[node name="Coin3" parent="Coins" unique_id=1698396235 instance=ExtResource("12_dinhu")]
|
||||
position = Vector2(466, 514)
|
||||
|
||||
[node name="Coin4" parent="Coins" unique_id=637616183 instance=ExtResource("12_dinhu")]
|
||||
position = Vector2(507, 488)
|
||||
|
||||
[node name="Coin5" parent="Coins" unique_id=1538621726 instance=ExtResource("12_dinhu")]
|
||||
position = Vector2(496, 535)
|
||||
|
||||
[node name="Coin6" parent="Coins" unique_id=1608922508 instance=ExtResource("12_dinhu")]
|
||||
position = Vector2(535, 565)
|
||||
|
||||
[node name="Coin7" parent="Coins" unique_id=227433727 instance=ExtResource("12_dinhu")]
|
||||
position = Vector2(420, 464)
|
||||
|
||||
[node name="Coin8" parent="Coins" unique_id=466741782 instance=ExtResource("12_dinhu")]
|
||||
position = Vector2(610, 514)
|
||||
|
||||
[node name="Coin9" parent="Coins" unique_id=1670069503 instance=ExtResource("12_dinhu")]
|
||||
position = Vector2(458, 477)
|
||||
|
||||
[node name="Coin10" parent="Coins" unique_id=463607762 instance=ExtResource("12_dinhu")]
|
||||
position = Vector2(558, 494)
|
||||
|
||||
[node name="Slimes" type="Node2D" parent="." unique_id=53042223]
|
||||
|
||||
[node name="GreenSlime" parent="Slimes" unique_id=505365009 instance=ExtResource("13_kvuet")]
|
||||
@ -532,3 +533,7 @@ position = Vector2(834, 536)
|
||||
|
||||
[node name="GreenSlime3" parent="Slimes" unique_id=1389734884 instance=ExtResource("13_kvuet")]
|
||||
position = Vector2(268, 504)
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="." unique_id=1382209759]
|
||||
|
||||
[node name="UI" parent="CanvasLayer" unique_id=2022682093 instance=ExtResource("14_trtic")]
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://c7i6hsic2uojx" path="res://scenes/trigger.tscn" id="9_o3sye"]
|
||||
[ext_resource type="PackedScene" uid="uid://xvv1nyl3ny2g" path="res://scenes/crate.tscn" id="10_24ks5"]
|
||||
[ext_resource type="PackedScene" uid="uid://bmkh4wsfm3fbq" path="res://scenes/npc_charector.tscn" id="11_s4es8"]
|
||||
[ext_resource type="PackedScene" uid="uid://c1dgwb1r7e2fg" path="res://scenes/ui.tscn" id="12_8g4ke"]
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_gee14"]
|
||||
texture = ExtResource("5_cleqw")
|
||||
@ -473,3 +474,7 @@ shape = SubResource("WorldBoundaryShape2D_lbhrr")
|
||||
|
||||
[node name="NPCCharector" parent="." unique_id=912777798 instance=ExtResource("11_s4es8")]
|
||||
position = Vector2(460, 422)
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="." unique_id=139532618]
|
||||
|
||||
[node name="UI" parent="CanvasLayer" unique_id=2022682093 instance=ExtResource("12_8g4ke")]
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://c7i6hsic2uojx" path="res://scenes/trigger.tscn" id="9_07lh1"]
|
||||
[ext_resource type="PackedScene" uid="uid://xvv1nyl3ny2g" path="res://scenes/crate.tscn" id="10_6uuvf"]
|
||||
[ext_resource type="PackedScene" uid="uid://bmkh4wsfm3fbq" path="res://scenes/npc_charector.tscn" id="11_x008a"]
|
||||
[ext_resource type="PackedScene" uid="uid://c1dgwb1r7e2fg" path="res://scenes/ui.tscn" id="12_qewby"]
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_gee14"]
|
||||
texture = ExtResource("5_e40mx")
|
||||
@ -473,3 +474,7 @@ shape = SubResource("WorldBoundaryShape2D_lbhrr")
|
||||
|
||||
[node name="NPCCharector" parent="." unique_id=912777798 instance=ExtResource("11_x008a")]
|
||||
position = Vector2(460, 422)
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="." unique_id=832652357]
|
||||
|
||||
[node name="UI" parent="CanvasLayer" unique_id=2022682093 instance=ExtResource("12_qewby")]
|
||||
|
||||
@ -3,15 +3,73 @@
|
||||
[ext_resource type="Script" uid="uid://ctm4xm3lnquco" path="res://scripts/player.gd" id="1_3vyb7"]
|
||||
[ext_resource type="Texture2D" uid="uid://cvcfc7qj6sxfp" path="res://assets/graphics/player/jump_fall/player jump 48x48.png" id="2_dqkch"]
|
||||
[ext_resource type="Texture2D" uid="uid://cy1khw337wx4h" path="res://assets/graphics/player/idle/Player Idle 48x48(1).png" id="2_g2els"]
|
||||
[ext_resource type="Texture2D" uid="uid://bululkhh0pe48" path="res://assets/graphics/player/death/Player Death 64x64.png" id="2_tuyoq"]
|
||||
[ext_resource type="Texture2D" uid="uid://cvs62nydereyb" path="res://assets/graphics/player/running/player run 48x48(1).png" id="3_qhqgy"]
|
||||
[ext_resource type="Texture2D" uid="uid://cvm8klajafilg" path="res://assets/graphics/player/hurt/Player Hurt 48x48.png" id="4_fjrip"]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_dqkch"]
|
||||
height = 34.0
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_l71n6"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ke2ow"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ujl30"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_31cv2"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_pf23h"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(192, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dt7fs"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(240, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wqfne"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(288, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wnwbv"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(336, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_gl8cc"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(384, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_487ah"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(432, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_i4ail"]
|
||||
atlas = ExtResource("2_dqkch")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_md1ol"]
|
||||
atlas = ExtResource("4_fjrip")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_bj30b"]
|
||||
atlas = ExtResource("4_fjrip")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_jc3p3"]
|
||||
atlas = ExtResource("4_fjrip")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_hax0n"]
|
||||
atlas = ExtResource("4_fjrip")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qhqgy"]
|
||||
atlas = ExtResource("2_g2els")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
@ -92,10 +150,85 @@ region = Rect2(288, 0, 48, 48)
|
||||
atlas = ExtResource("3_qhqgy")
|
||||
region = Rect2(336, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_t4otl"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(432, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_j2b1d"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(384, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_cs1tg"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(336, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_2dvfe"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(288, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_giy8y"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(240, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_fdfoy"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(192, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_hhpqf"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(144, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_g5jhy"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(96, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_holxr"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(48, 0, 48, 48)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_mx1m4"]
|
||||
atlas = ExtResource("2_tuyoq")
|
||||
region = Rect2(0, 0, 48, 48)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_jej6c"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_l71n6")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ke2ow")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ujl30")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_31cv2")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_pf23h")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_dt7fs")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_wqfne")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_wnwbv")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_gl8cc")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_487ah")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"death",
|
||||
"speed": 2.5
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_i4ail")
|
||||
}],
|
||||
"loop": false,
|
||||
@ -104,6 +237,23 @@ animations = [{
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_md1ol")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_bj30b")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_jc3p3")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_hax0n")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"hurt",
|
||||
"speed": 12.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qhqgy")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
@ -176,6 +326,41 @@ animations = [{
|
||||
"loop": true,
|
||||
"name": &"running",
|
||||
"speed": 12.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_t4otl")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_j2b1d")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_cs1tg")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_2dvfe")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_giy8y")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_fdfoy")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_hhpqf")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_g5jhy")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_holxr")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_mx1m4")
|
||||
}],
|
||||
"loop": false,
|
||||
"name": &"spawn",
|
||||
"speed": 12.0
|
||||
}]
|
||||
|
||||
[node name="Player" type="CharacterBody2D" unique_id=401513938]
|
||||
@ -196,8 +381,10 @@ position = Vector2(-12, -19)
|
||||
texture_filter = 1
|
||||
position = Vector2(0, -16)
|
||||
sprite_frames = SubResource("SpriteFrames_jej6c")
|
||||
animation = &"idle"
|
||||
animation = &"death"
|
||||
autoplay = "idle"
|
||||
frame = 9
|
||||
frame_progress = 1.0
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="." unique_id=619350893]
|
||||
offset = Vector2(0, -30)
|
||||
|
||||
48
scenes/ui.tscn
Normal file
48
scenes/ui.tscn
Normal file
@ -0,0 +1,48 @@
|
||||
[gd_scene format=3 uid="uid://c1dgwb1r7e2fg"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dcpm4dbhpfksa" path="res://scripts/ui.gd" id="1_nt7q6"]
|
||||
|
||||
[node name="UI" type="Control" unique_id=2022682093]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_vertical = 0
|
||||
script = ExtResource("1_nt7q6")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="." unique_id=830528802]
|
||||
layout_mode = 1
|
||||
anchors_preset = 10
|
||||
anchor_right = 1.0
|
||||
grow_horizontal = 2
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer" unique_id=1238491607]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/HBoxContainer" unique_id=752114180]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Health" type="Label" parent="VBoxContainer/HBoxContainer/MarginContainer" unique_id=681594112]
|
||||
layout_mode = 2
|
||||
text = "HEALTH"
|
||||
|
||||
[node name="MarginContainer2" type="MarginContainer" parent="VBoxContainer/HBoxContainer" unique_id=362368783]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Timer" type="Label" parent="VBoxContainer/HBoxContainer/MarginContainer2" unique_id=691788231]
|
||||
layout_mode = 2
|
||||
text = "TIMER"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="MarginContainer3" type="MarginContainer" parent="VBoxContainer/HBoxContainer" unique_id=1764636320]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="Coins" type="Label" parent="VBoxContainer/HBoxContainer/MarginContainer3" unique_id=319763029]
|
||||
layout_mode = 2
|
||||
text = "COINS"
|
||||
horizontal_alignment = 2
|
||||
@ -5,6 +5,8 @@ class_name SceneManager extends Node2D
|
||||
@onready var level: Node2D = $"../Level"
|
||||
@onready var coins: Node2D = $"../Coins"
|
||||
@onready var slimes: Node2D = $"../Slimes"
|
||||
@onready var player: Player = $"../Player"
|
||||
@onready var ui: UI = $"../CanvasLayer/UI"
|
||||
|
||||
var bullet = preload("res://scenes/bullet.tscn")
|
||||
var bulletArray:Array[Bullet] = []
|
||||
@ -18,7 +20,10 @@ func _ready() -> void:
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
if Input.is_action_just_pressed("save"):
|
||||
print("save the game")
|
||||
if Input.is_action_just_pressed("load"):
|
||||
print("load the game")
|
||||
|
||||
func buildLevel()->void:
|
||||
print("building level")
|
||||
@ -31,6 +36,12 @@ func buildLevel()->void:
|
||||
Gamecontroller.destroySignal.connect(destroy)
|
||||
Gamecontroller.teleportSignal.connect(teleport)
|
||||
Gamecontroller.levelChangeSignal.connect(loadLevel)
|
||||
Gamecontroller.playerDamageSignal.connect(player.playerDamage)
|
||||
Gamecontroller.playerDamageSignal.connect(ui.updateHealth)
|
||||
Gamecontroller.playerDeathSignal.connect(player.playerDead)
|
||||
Gamecontroller.countDownSignal.connect(ui.updateTimer)
|
||||
Gamecontroller.coinsCollectedSignal.connect(ui.updateCoins)
|
||||
player.deathAnimationCompleteSignal.connect(Gamecontroller.loadLevel)
|
||||
func updateEnemies()->void:
|
||||
if slimes:
|
||||
var totalSlimes = 0
|
||||
|
||||
@ -4,6 +4,10 @@ var crateTotal = 0
|
||||
signal destroySignal(body)
|
||||
signal teleportSignal(body)
|
||||
signal levelChangeSignal(level)
|
||||
signal playerDamageSignal(health, maxHealth)
|
||||
signal playerDeathSignal
|
||||
signal countDownSignal(timeRemaning)
|
||||
signal coinsCollectedSignal(totalCoinsCollected, coinsRemaning)
|
||||
var currentScene:String = "res://scenes/game.tscn"
|
||||
|
||||
var timer := Timer.new()
|
||||
@ -19,8 +23,15 @@ var playerHealth = 100
|
||||
var playerStartingHealth = 100
|
||||
|
||||
var enemiesDict={}
|
||||
|
||||
var enemy:CharectorStats
|
||||
var player:CharectorStats
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
enemy = load("res://scripts/rscs/slimeStats.tres")
|
||||
player = load("res://scripts/rscs/playerStats.tres")
|
||||
get_window().grab_focus()
|
||||
add_child(timer)
|
||||
timer.wait_time = 1
|
||||
@ -30,10 +41,12 @@ func _ready() -> void:
|
||||
|
||||
func reset()->void:
|
||||
timeAvailable = timers[currentLevel]
|
||||
playerHealth = playerStartingHealth
|
||||
playerHealth = player.starting_health
|
||||
coinsCollected = 0
|
||||
|
||||
func secondCounter()->void:
|
||||
timeAvailable -=1
|
||||
countDownSignal.emit(timeAvailable)
|
||||
if timeAvailable <=0:
|
||||
print("YOU LOST YOU ARE A LOSER YOU SUCK")
|
||||
levelChangeSignal.emit(levels[currentLevel])
|
||||
@ -72,7 +85,7 @@ func bulletDamage(body:Node2D, bullet:Bullet)->void:
|
||||
destroySignal.emit(body)
|
||||
destroySignal.emit(bullet)
|
||||
if body is Slime:
|
||||
enemiesDict[body]["health"] -= 10
|
||||
enemiesDict[body]["health"] -= player.rangeDamage
|
||||
if enemiesDict[body]["health"] <= 0:
|
||||
destroySignal.emit(body)
|
||||
destroySignal.emit(bullet)
|
||||
@ -84,6 +97,7 @@ func _on_coin_collected(body:Node2D, coin:Coin):
|
||||
|
||||
func totalCoins(value)->void:
|
||||
print("GC know coins remaning "+str(value))
|
||||
coinsCollectedSignal.emit(coinsCollected, value)
|
||||
if value <= 0:
|
||||
currentLevel += 1
|
||||
if currentLevel >= levels.size():
|
||||
@ -93,12 +107,19 @@ func _on_slime_damage(boyd:Node2D, slime:Slime)->void:
|
||||
playerHealth -= enemiesDict[slime]["damage"]
|
||||
print("GC DAMAGE THE PLAYER AND KILL THEM "+str(playerHealth))
|
||||
if playerHealth <=0:
|
||||
print(" YOU DED ")
|
||||
levelChangeSignal.emit(levels[currentLevel])
|
||||
print("YOU Dieded")
|
||||
playerDeathSignal.emit()
|
||||
#levelChangeSignal.emit(levels[currentLevel])
|
||||
else:
|
||||
#damage
|
||||
playerDamageSignal.emit(playerHealth, player.max_health)
|
||||
func addEnemyToLevel(slime:Slime)->void:
|
||||
var randDamage:int = randi()%10
|
||||
#var randDamage:int = randi()%10
|
||||
var enemyStat = {
|
||||
"health":50,
|
||||
"damage":randDamage
|
||||
"health":enemy.starting_health,
|
||||
"damage":enemy.meleeDamage
|
||||
}
|
||||
enemiesDict[slime]=enemyStat
|
||||
|
||||
func loadLevel()->void:
|
||||
levelChangeSignal.emit(levels[currentLevel])
|
||||
|
||||
@ -10,14 +10,16 @@ const BUMP_POWER = 1000
|
||||
enum FaceDirection{LEFT, RIGHT}
|
||||
var facing:FaceDirection = FaceDirection.RIGHT
|
||||
var direction
|
||||
enum PlayerState{IDLE,RUNNING,JUMPING,FALLING}
|
||||
enum PlayerState{IDLE,RUNNING,JUMPING,FALLING,HURT,DEATH,SPAWN}
|
||||
var current_player_state:PlayerState = PlayerState.IDLE
|
||||
var jumpUp:bool = false
|
||||
|
||||
signal deathAnimationCompleteSignal
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
|
||||
#Handle Shoot
|
||||
|
||||
if current_player_state != PlayerState.DEATH:
|
||||
handle_input()
|
||||
handle_movement(delta)
|
||||
handle_state()
|
||||
@ -76,6 +78,10 @@ func handle_animation()->void:
|
||||
player_graphic.play("jumping")
|
||||
PlayerState.FALLING:
|
||||
player_graphic.play("falling")
|
||||
PlayerState.HURT:
|
||||
player_graphic.play("hurt")
|
||||
PlayerState.DEATH:
|
||||
player_graphic.play("death")
|
||||
|
||||
func handle_movement(delta)->void:
|
||||
# Add the gravity.
|
||||
@ -104,3 +110,14 @@ func _on_animation_finished() -> void:
|
||||
match current_player_state:
|
||||
PlayerState.JUMPING:
|
||||
jumpUp = false
|
||||
PlayerState.HURT:
|
||||
current_player_state = PlayerState.IDLE
|
||||
PlayerState.DEATH:
|
||||
deathAnimationCompleteSignal.emit()
|
||||
|
||||
func playerDamage(health, maxHealth) ->void:
|
||||
print("c")
|
||||
current_player_state = PlayerState.HURT
|
||||
func playerDead()-> void:
|
||||
print("You FINALY DIED")
|
||||
current_player_state = PlayerState.DEATH
|
||||
|
||||
11
scripts/rscs/charecterStats.gd
Normal file
11
scripts/rscs/charecterStats.gd
Normal file
@ -0,0 +1,11 @@
|
||||
class_name CharectorStats extends Resource
|
||||
|
||||
@export_category("Health")
|
||||
@export var health:int = 100
|
||||
@export var max_health:int = 100
|
||||
@export var starting_health:int = 100
|
||||
|
||||
#damage
|
||||
@export_category("Damage")
|
||||
@export var meleeDamage:int =10
|
||||
@export var rangeDamage: int =5
|
||||
1
scripts/rscs/charecterStats.gd.uid
Normal file
1
scripts/rscs/charecterStats.gd.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://b7u1be28qy8ye
|
||||
7
scripts/rscs/playerStats.tres
Normal file
7
scripts/rscs/playerStats.tres
Normal file
@ -0,0 +1,7 @@
|
||||
[gd_resource type="Resource" script_class="CharectorStats" format=3 uid="uid://omvjulu840js"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b7u1be28qy8ye" path="res://scripts/rscs/charecterStats.gd" id="1_sqkfu"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_sqkfu")
|
||||
metadata/_custom_type_script = "uid://b7u1be28qy8ye"
|
||||
12
scripts/rscs/slimeStats.tres
Normal file
12
scripts/rscs/slimeStats.tres
Normal file
@ -0,0 +1,12 @@
|
||||
[gd_resource type="Resource" script_class="CharectorStats" format=3 uid="uid://dep2ewei086m4"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b7u1be28qy8ye" path="res://scripts/rscs/charecterStats.gd" id="1_ppipo"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_ppipo")
|
||||
health = 20
|
||||
max_health = 30
|
||||
starting_health = 20
|
||||
meleeDamage = 20
|
||||
rangeDamage = 0
|
||||
metadata/_custom_type_script = "uid://b7u1be28qy8ye"
|
||||
16
scripts/ui.gd
Normal file
16
scripts/ui.gd
Normal file
@ -0,0 +1,16 @@
|
||||
class_name UI extends Control
|
||||
@onready var health: Label = $VBoxContainer/HBoxContainer/MarginContainer/Health
|
||||
@onready var timer: Label = $VBoxContainer/HBoxContainer/MarginContainer2/Timer
|
||||
@onready var coins: Label = $VBoxContainer/HBoxContainer/MarginContainer3/Coins
|
||||
|
||||
func _ready() -> void:
|
||||
health.text = "Hi MOM"
|
||||
|
||||
func updateTimer(timerValue)->void:
|
||||
timer.text =str(timerValue)
|
||||
|
||||
func updateHealth(healthValue, maxHealth)->void:
|
||||
health.text = str(healthValue)
|
||||
|
||||
func updateCoins(collectedCoins, coinsRemaning)->void:
|
||||
coins.text=str(collectedCoins)+" of "+str(coinsRemaning+collectedCoins)
|
||||
1
scripts/ui.gd.uid
Normal file
1
scripts/ui.gd.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://dcpm4dbhpfksa
|
||||
Loading…
Reference in New Issue
Block a user