final week
This commit is contained in:
parent
fa5025b626
commit
7b14cc8333
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://dgj6nq2pnxgho"
|
||||||
|
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://cdsu1cetxa45b"
|
||||||
|
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
|
||||||
46
export_presets.cfg
Normal file
46
export_presets.cfg
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
[preset.0]
|
||||||
|
|
||||||
|
name="Linux"
|
||||||
|
platform="Linux"
|
||||||
|
runnable=true
|
||||||
|
dedicated_server=false
|
||||||
|
custom_features=""
|
||||||
|
export_filter="all_resources"
|
||||||
|
include_filter=""
|
||||||
|
exclude_filter=""
|
||||||
|
export_path="../../godotexport/MarchGame.arm64"
|
||||||
|
patches=PackedStringArray()
|
||||||
|
patch_delta_encoding=false
|
||||||
|
patch_delta_compression_level_zstd=19
|
||||||
|
patch_delta_min_reduction=0.1
|
||||||
|
patch_delta_include_filters="*"
|
||||||
|
patch_delta_exclude_filters=""
|
||||||
|
encryption_include_filters=""
|
||||||
|
encryption_exclude_filters=""
|
||||||
|
seed=0
|
||||||
|
encrypt_pck=false
|
||||||
|
encrypt_directory=false
|
||||||
|
script_export_mode=2
|
||||||
|
|
||||||
|
[preset.0.options]
|
||||||
|
|
||||||
|
custom_template/debug=""
|
||||||
|
custom_template/release=""
|
||||||
|
debug/export_console_wrapper=1
|
||||||
|
binary_format/embed_pck=false
|
||||||
|
texture_format/s3tc_bptc=true
|
||||||
|
texture_format/etc2_astc=false
|
||||||
|
shader_baker/enabled=false
|
||||||
|
binary_format/architecture="arm64"
|
||||||
|
ssh_remote_deploy/enabled=false
|
||||||
|
ssh_remote_deploy/host="user@host_ip"
|
||||||
|
ssh_remote_deploy/port="22"
|
||||||
|
ssh_remote_deploy/extra_args_ssh=""
|
||||||
|
ssh_remote_deploy/extra_args_scp=""
|
||||||
|
ssh_remote_deploy/run_script="#!/usr/bin/env bash
|
||||||
|
export DISPLAY=:0
|
||||||
|
unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
|
||||||
|
\"{temp_dir}/{exe_name}\" {cmd_args}"
|
||||||
|
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
|
||||||
|
pkill -x -f \"{temp_dir}/{exe_name} {cmd_args}\"
|
||||||
|
rm -rf \"{temp_dir}\""
|
||||||
@ -42,6 +42,16 @@ shoot={
|
|||||||
"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":90,"key_label":0,"unicode":122,"location":0,"echo":false,"script":null)
|
"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":90,"key_label":0,"unicode":122,"location":0,"echo":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]
|
[physics]
|
||||||
|
|
||||||
|
|||||||
@ -14,6 +14,7 @@
|
|||||||
[ext_resource type="Texture2D" uid="uid://cufqer3a7texm" path="res://assets/graphics/environment/terrain/bg/background B layer4.png" id="13_kvuet"]
|
[ext_resource type="Texture2D" uid="uid://cufqer3a7texm" path="res://assets/graphics/environment/terrain/bg/background B layer4.png" id="13_kvuet"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dowh0cdyuldlp" path="res://scenes/coin.tscn" id="13_trtic"]
|
[ext_resource type="PackedScene" uid="uid://dowh0cdyuldlp" path="res://scenes/coin.tscn" id="13_trtic"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dkht2dvm4ob7d" path="res://scenes/slime.tscn" id="14_trtic"]
|
[ext_resource type="PackedScene" uid="uid://dkht2dvm4ob7d" path="res://scenes/slime.tscn" id="14_trtic"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://6cde4fo65rig" path="res://scenes/ui.tscn" id="15_ir15t"]
|
||||||
|
|
||||||
[sub_resource type="TileMapPattern" id="TileMapPattern_u5sy4"]
|
[sub_resource type="TileMapPattern" id="TileMapPattern_u5sy4"]
|
||||||
tile_data = PackedInt32Array(0, 1, 0, 65536, 1, 1, 131072, 1, 1, 196608, 1, 2, 1, 65537, 0, 65537, 65537, 1, 131073, 131073, 1, 196609, 65537, 2, 2, 65537, 0, 65538, 131073, 1, 131074, 65537, 1, 196610, 65537, 2, 3, 131073, 0, 65539, 262145, 1, 131075, 131073, 1, 196611, 131073, 2)
|
tile_data = PackedInt32Array(0, 1, 0, 65536, 1, 1, 131072, 1, 1, 196608, 1, 2, 1, 65537, 0, 65537, 65537, 1, 131073, 131073, 1, 196609, 65537, 2, 2, 65537, 0, 65538, 131073, 1, 131074, 65537, 1, 196610, 65537, 2, 3, 131073, 0, 65539, 262145, 1, 131075, 131073, 1, 196611, 131073, 2)
|
||||||
@ -521,3 +522,7 @@ position = Vector2(494, 311)
|
|||||||
|
|
||||||
[node name="Slime2" parent="Slimes" unique_id=141676046 instance=ExtResource("14_trtic")]
|
[node name="Slime2" parent="Slimes" unique_id=141676046 instance=ExtResource("14_trtic")]
|
||||||
position = Vector2(461, 311)
|
position = Vector2(461, 311)
|
||||||
|
|
||||||
|
[node name="CanvasLayer" type="CanvasLayer" parent="." unique_id=1721503250]
|
||||||
|
|
||||||
|
[node name="ui" parent="CanvasLayer" unique_id=1523689629 instance=ExtResource("15_ir15t")]
|
||||||
|
|||||||
@ -12,6 +12,7 @@
|
|||||||
[ext_resource type="PackedScene" uid="uid://bf50mxdma8wq4" path="res://scenes/trigger.tscn" id="10_s4es8"]
|
[ext_resource type="PackedScene" uid="uid://bf50mxdma8wq4" path="res://scenes/trigger.tscn" id="10_s4es8"]
|
||||||
[ext_resource type="PackedScene" uid="uid://b6lw2go5mwk3h" path="res://scenes/crate.tscn" id="11_63e4f"]
|
[ext_resource type="PackedScene" uid="uid://b6lw2go5mwk3h" path="res://scenes/crate.tscn" id="11_63e4f"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bgi18lbutp5ui" path="res://scenes/npc_character.tscn" id="12_y6lc1"]
|
[ext_resource type="PackedScene" uid="uid://bgi18lbutp5ui" path="res://scenes/npc_character.tscn" id="12_y6lc1"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://6cde4fo65rig" path="res://scenes/ui.tscn" id="13_56gwk"]
|
||||||
|
|
||||||
[sub_resource type="TileMapPattern" id="TileMapPattern_u5sy4"]
|
[sub_resource type="TileMapPattern" id="TileMapPattern_u5sy4"]
|
||||||
tile_data = PackedInt32Array(0, 1, 0, 65536, 1, 1, 131072, 1, 1, 196608, 1, 2, 1, 65537, 0, 65537, 65537, 1, 131073, 131073, 1, 196609, 65537, 2, 2, 65537, 0, 65538, 131073, 1, 131074, 65537, 1, 196610, 65537, 2, 3, 131073, 0, 65539, 262145, 1, 131075, 131073, 1, 196611, 131073, 2)
|
tile_data = PackedInt32Array(0, 1, 0, 65536, 1, 1, 131072, 1, 1, 196608, 1, 2, 1, 65537, 0, 65537, 65537, 1, 131073, 131073, 1, 196609, 65537, 2, 2, 65537, 0, 65538, 131073, 1, 131074, 65537, 1, 196610, 65537, 2, 3, 131073, 0, 65539, 262145, 1, 131075, 131073, 1, 196611, 131073, 2)
|
||||||
@ -497,3 +498,7 @@ shape = SubResource("WorldBoundaryShape2D_lbhrr")
|
|||||||
|
|
||||||
[node name="NPCCharacter" parent="." unique_id=597270257 instance=ExtResource("12_y6lc1")]
|
[node name="NPCCharacter" parent="." unique_id=597270257 instance=ExtResource("12_y6lc1")]
|
||||||
position = Vector2(103, 417)
|
position = Vector2(103, 417)
|
||||||
|
|
||||||
|
[node name="CanvasLayer" type="CanvasLayer" parent="." unique_id=161671243]
|
||||||
|
|
||||||
|
[node name="ui" parent="CanvasLayer" unique_id=1523689629 instance=ExtResource("13_56gwk")]
|
||||||
|
|||||||
@ -12,6 +12,7 @@
|
|||||||
[ext_resource type="PackedScene" uid="uid://bf50mxdma8wq4" path="res://scenes/trigger.tscn" id="10_x008a"]
|
[ext_resource type="PackedScene" uid="uid://bf50mxdma8wq4" path="res://scenes/trigger.tscn" id="10_x008a"]
|
||||||
[ext_resource type="PackedScene" uid="uid://b6lw2go5mwk3h" path="res://scenes/crate.tscn" id="11_atr84"]
|
[ext_resource type="PackedScene" uid="uid://b6lw2go5mwk3h" path="res://scenes/crate.tscn" id="11_atr84"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bgi18lbutp5ui" path="res://scenes/npc_character.tscn" id="12_qyu38"]
|
[ext_resource type="PackedScene" uid="uid://bgi18lbutp5ui" path="res://scenes/npc_character.tscn" id="12_qyu38"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://6cde4fo65rig" path="res://scenes/ui.tscn" id="13_bradm"]
|
||||||
|
|
||||||
[sub_resource type="TileMapPattern" id="TileMapPattern_u5sy4"]
|
[sub_resource type="TileMapPattern" id="TileMapPattern_u5sy4"]
|
||||||
tile_data = PackedInt32Array(0, 1, 0, 65536, 1, 1, 131072, 1, 1, 196608, 1, 2, 1, 65537, 0, 65537, 65537, 1, 131073, 131073, 1, 196609, 65537, 2, 2, 65537, 0, 65538, 131073, 1, 131074, 65537, 1, 196610, 65537, 2, 3, 131073, 0, 65539, 262145, 1, 131075, 131073, 1, 196611, 131073, 2)
|
tile_data = PackedInt32Array(0, 1, 0, 65536, 1, 1, 131072, 1, 1, 196608, 1, 2, 1, 65537, 0, 65537, 65537, 1, 131073, 131073, 1, 196609, 65537, 2, 2, 65537, 0, 65538, 131073, 1, 131074, 65537, 1, 196610, 65537, 2, 3, 131073, 0, 65539, 262145, 1, 131075, 131073, 1, 196611, 131073, 2)
|
||||||
@ -497,3 +498,7 @@ shape = SubResource("WorldBoundaryShape2D_lbhrr")
|
|||||||
|
|
||||||
[node name="NPCCharacter" parent="." unique_id=597270257 instance=ExtResource("12_qyu38")]
|
[node name="NPCCharacter" parent="." unique_id=597270257 instance=ExtResource("12_qyu38")]
|
||||||
position = Vector2(103, 417)
|
position = Vector2(103, 417)
|
||||||
|
|
||||||
|
[node name="CanvasLayer" type="CanvasLayer" parent="." unique_id=1454087989]
|
||||||
|
|
||||||
|
[node name="ui" parent="CanvasLayer" unique_id=1523689629 instance=ExtResource("13_bradm")]
|
||||||
|
|||||||
@ -3,14 +3,72 @@
|
|||||||
[ext_resource type="Script" uid="uid://c17de7vvtri1e" path="res://scripts/player.gd" id="1_3vyb7"]
|
[ext_resource type="Script" uid="uid://c17de7vvtri1e" path="res://scripts/player.gd" id="1_3vyb7"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bihghvekq435s" path="res://assets/graphics/player/jump_fall/player jump 48x48.png" id="2_dqkch"]
|
[ext_resource type="Texture2D" uid="uid://bihghvekq435s" path="res://assets/graphics/player/jump_fall/player jump 48x48.png" id="2_dqkch"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dyus25iplw8ei" path="res://assets/graphics/player/idle/Player Idle 48x48.png" id="2_g2els"]
|
[ext_resource type="Texture2D" uid="uid://dyus25iplw8ei" path="res://assets/graphics/player/idle/Player Idle 48x48.png" id="2_g2els"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dgj6nq2pnxgho" path="res://assets/graphics/player/death/Player Death 64x64.png" id="2_tuyoq"]
|
||||||
[ext_resource type="Texture2D" uid="uid://3c7ngirfyrkh" path="res://assets/graphics/player/running/player run 48x48.png" id="3_qhqgy"]
|
[ext_resource type="Texture2D" uid="uid://3c7ngirfyrkh" path="res://assets/graphics/player/running/player run 48x48.png" id="3_qhqgy"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cdsu1cetxa45b" path="res://assets/graphics/player/hurt/Player Hurt 48x48.png" id="4_fjrip"]
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_uwrxv"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_uwrxv"]
|
||||||
|
|
||||||
|
[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"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_i4ail"]
|
||||||
atlas = ExtResource("2_dqkch")
|
atlas = ExtResource("2_dqkch")
|
||||||
region = Rect2(96, 0, 48, 48)
|
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"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_qhqgy"]
|
||||||
atlas = ExtResource("2_g2els")
|
atlas = ExtResource("2_g2els")
|
||||||
region = Rect2(0, 0, 48, 48)
|
region = Rect2(0, 0, 48, 48)
|
||||||
@ -91,10 +149,85 @@ region = Rect2(288, 0, 48, 48)
|
|||||||
atlas = ExtResource("3_qhqgy")
|
atlas = ExtResource("3_qhqgy")
|
||||||
region = Rect2(336, 0, 48, 48)
|
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"]
|
[sub_resource type="SpriteFrames" id="SpriteFrames_jej6c"]
|
||||||
animations = [{
|
animations = [{
|
||||||
"frames": [{
|
"frames": [{
|
||||||
"duration": 1.0,
|
"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": 3.0
|
||||||
|
}, {
|
||||||
|
"frames": [{
|
||||||
|
"duration": 1.0,
|
||||||
"texture": SubResource("AtlasTexture_i4ail")
|
"texture": SubResource("AtlasTexture_i4ail")
|
||||||
}],
|
}],
|
||||||
"loop": false,
|
"loop": false,
|
||||||
@ -103,6 +236,23 @@ animations = [{
|
|||||||
}, {
|
}, {
|
||||||
"frames": [{
|
"frames": [{
|
||||||
"duration": 1.0,
|
"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")
|
"texture": SubResource("AtlasTexture_qhqgy")
|
||||||
}, {
|
}, {
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
@ -175,6 +325,41 @@ animations = [{
|
|||||||
"loop": true,
|
"loop": true,
|
||||||
"name": &"running",
|
"name": &"running",
|
||||||
"speed": 12.0
|
"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": true,
|
||||||
|
"name": &"spawn",
|
||||||
|
"speed": 12.0
|
||||||
}]
|
}]
|
||||||
|
|
||||||
[node name="Player" type="CharacterBody2D" unique_id=161143934]
|
[node name="Player" type="CharacterBody2D" unique_id=161143934]
|
||||||
@ -195,7 +380,7 @@ position = Vector2(-15, -3)
|
|||||||
texture_filter = 1
|
texture_filter = 1
|
||||||
position = Vector2(1, -7)
|
position = Vector2(1, -7)
|
||||||
sprite_frames = SubResource("SpriteFrames_jej6c")
|
sprite_frames = SubResource("SpriteFrames_jej6c")
|
||||||
animation = &"falling"
|
animation = &"death"
|
||||||
autoplay = "idle"
|
autoplay = "idle"
|
||||||
|
|
||||||
[node name="Camera2D" type="Camera2D" parent="." unique_id=453583176]
|
[node name="Camera2D" type="Camera2D" parent="." unique_id=453583176]
|
||||||
|
|||||||
47
scenes/ui.tscn
Normal file
47
scenes/ui.tscn
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
[gd_scene format=3 uid="uid://6cde4fo65rig"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://6tbvoaj20pws" path="res://scripts/ui.gd" id="1_nt7q6"]
|
||||||
|
|
||||||
|
[node name="ui" type="Control" unique_id=1523689629]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
script = ExtResource("1_nt7q6")
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="." unique_id=860304686]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 10
|
||||||
|
anchor_right = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer" unique_id=815365890]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/HBoxContainer" unique_id=1206394048]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="health" type="Label" parent="VBoxContainer/HBoxContainer/MarginContainer" unique_id=1839745909]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "HEALTH"
|
||||||
|
|
||||||
|
[node name="MarginContainer2" type="MarginContainer" parent="VBoxContainer/HBoxContainer" unique_id=1606638895]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="timer" type="Label" parent="VBoxContainer/HBoxContainer/MarginContainer2" unique_id=1053612937]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "TIMER"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
|
||||||
|
[node name="MarginContainer3" type="MarginContainer" parent="VBoxContainer/HBoxContainer" unique_id=85183065]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="coiins" type="Label" parent="VBoxContainer/HBoxContainer/MarginContainer3" unique_id=827757901]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "COINS"
|
||||||
|
horizontal_alignment = 2
|
||||||
@ -4,6 +4,11 @@ var crateTotal = 0
|
|||||||
signal destroySignal(body)
|
signal destroySignal(body)
|
||||||
signal teleportSignal(body)
|
signal teleportSignal(body)
|
||||||
signal levelChangeSignal(level)
|
signal levelChangeSignal(level)
|
||||||
|
signal playerDamageSignal(health, maxHealth)
|
||||||
|
signal playerDeathSignal
|
||||||
|
signal countDownSignal(timeRemaining)
|
||||||
|
signal coinCollectedSignal(totalCoinsCollected, coinsRemaining)
|
||||||
|
|
||||||
var currentScene:String = "res://scenes/game.tscn"
|
var currentScene:String = "res://scenes/game.tscn"
|
||||||
|
|
||||||
var timer := Timer.new()
|
var timer := Timer.new()
|
||||||
@ -20,10 +25,15 @@ var playerStartingHealth = 100
|
|||||||
|
|
||||||
var enemiesDict={}
|
var enemiesDict={}
|
||||||
|
|
||||||
|
var enemy:CharacterStats
|
||||||
|
var player:CharacterStats
|
||||||
|
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
get_window().grab_focus()
|
get_window().grab_focus()
|
||||||
|
enemy = load("res://scripts/rscs/slimeStats.tres")
|
||||||
|
player = load("res://scripts/rscs/playerStats.tres")
|
||||||
add_child(timer)
|
add_child(timer)
|
||||||
timer.wait_time = 1
|
timer.wait_time = 1
|
||||||
timer.one_shot= false
|
timer.one_shot= false
|
||||||
@ -32,10 +42,12 @@ func _ready() -> void:
|
|||||||
|
|
||||||
func reset()->void:
|
func reset()->void:
|
||||||
timeAvailable = timers[currentLevel]
|
timeAvailable = timers[currentLevel]
|
||||||
playerHealth = playerStartingHealth
|
playerHealth = player.starting_health
|
||||||
|
coinsCollected = 0
|
||||||
|
|
||||||
func secondCounter()->void:
|
func secondCounter()->void:
|
||||||
timeAvailable -=1
|
timeAvailable -=1
|
||||||
|
countDownSignal.emit(timeAvailable)
|
||||||
if timeAvailable <=0:
|
if timeAvailable <=0:
|
||||||
print("YOU LOSE BABY!!")
|
print("YOU LOSE BABY!!")
|
||||||
levelChangeSignal.emit(levels[currentLevel])
|
levelChangeSignal.emit(levels[currentLevel])
|
||||||
@ -78,7 +90,7 @@ func bulletDamage(body:Node2D, bullet:Bullet)->void:
|
|||||||
destroySignal.emit(body)
|
destroySignal.emit(body)
|
||||||
destroySignal.emit(bullet)
|
destroySignal.emit(bullet)
|
||||||
if body is Slime:
|
if body is Slime:
|
||||||
enemiesDict[body]["health"] -= 10
|
enemiesDict[body]["health"] -= player.rangeDamage
|
||||||
if enemiesDict[body]["health"]<=0:
|
if enemiesDict[body]["health"]<=0:
|
||||||
destroySignal.emit(body)
|
destroySignal.emit(body)
|
||||||
destroySignal.emit(bullet)
|
destroySignal.emit(bullet)
|
||||||
@ -90,6 +102,7 @@ func _on_coin_collected(body:Node2D, coin:Coin)->void:
|
|||||||
|
|
||||||
func totalCoins(value)->void:
|
func totalCoins(value)->void:
|
||||||
print("GC knows coins remaining "+str(value))
|
print("GC knows coins remaining "+str(value))
|
||||||
|
coinCollectedSignal.emit(coinsCollected, value)
|
||||||
if value <=0:
|
if value <=0:
|
||||||
#no coins left in level
|
#no coins left in level
|
||||||
currentLevel +=1
|
currentLevel +=1
|
||||||
@ -103,12 +116,20 @@ func _on_slime_damage(body:Node2D, slime:Slime)->void:
|
|||||||
print("GC knows slime damage to player "+str(playerHealth))
|
print("GC knows slime damage to player "+str(playerHealth))
|
||||||
if playerHealth <=0:
|
if playerHealth <=0:
|
||||||
print("YOU DED")
|
print("YOU DED")
|
||||||
levelChangeSignal.emit(levels[currentLevel])
|
playerDeathSignal.emit()
|
||||||
|
|
||||||
|
else:
|
||||||
|
#damage
|
||||||
|
playerDamageSignal.emit(playerHealth, player.max_health)
|
||||||
|
|
||||||
func addEnemyToLevel(slime:Slime)->void:
|
func addEnemyToLevel(slime:Slime)->void:
|
||||||
var randDamage:int = randi()%10
|
# var randDamage:int = randi()%10
|
||||||
var enemyStat = {
|
var enemyStat = {
|
||||||
"health":50,
|
"health":enemy.starting_health,
|
||||||
"damage":randDamage
|
"damage":enemy.meleeDamage
|
||||||
}
|
}
|
||||||
#put it in dictionary
|
#put it in dictionary
|
||||||
enemiesDict[slime]=enemyStat
|
enemiesDict[slime]=enemyStat
|
||||||
|
|
||||||
|
func loadLevel()->void:
|
||||||
|
levelChangeSignal.emit(levels[currentLevel])
|
||||||
|
|||||||
@ -11,13 +11,16 @@ const BUMP_POWER = 50
|
|||||||
enum FaceDirection{LEFT, RIGHT}
|
enum FaceDirection{LEFT, RIGHT}
|
||||||
var facing:FaceDirection = FaceDirection.RIGHT
|
var facing:FaceDirection = FaceDirection.RIGHT
|
||||||
var direction
|
var direction
|
||||||
enum PlayerState{IDLE,RUNNING, JUMPING, FALLING}
|
enum PlayerState{IDLE,RUNNING, JUMPING, FALLING, HURT, DEAD}
|
||||||
var current_player_state:PlayerState = PlayerState.IDLE
|
var current_player_state:PlayerState = PlayerState.IDLE
|
||||||
var jumpUp:bool = false
|
var jumpUp:bool = false
|
||||||
|
|
||||||
|
signal deathAnimationCompleteSignal
|
||||||
|
|
||||||
func _physics_process(delta: float) -> void:
|
func _physics_process(delta: float) -> void:
|
||||||
|
|
||||||
handle_input()
|
if current_player_state != PlayerState.DEAD:
|
||||||
|
handle_input()
|
||||||
handle_movement(delta)
|
handle_movement(delta)
|
||||||
handle_state()
|
handle_state()
|
||||||
handle_animation()
|
handle_animation()
|
||||||
@ -36,6 +39,7 @@ func handle_input()->void:
|
|||||||
velocity.y = JUMP_VELOCITY
|
velocity.y = JUMP_VELOCITY
|
||||||
current_player_state = PlayerState.JUMPING
|
current_player_state = PlayerState.JUMPING
|
||||||
jumpUp = true
|
jumpUp = true
|
||||||
|
|
||||||
# Handle Shoot
|
# Handle Shoot
|
||||||
if Input.is_action_just_pressed("shoot"):
|
if Input.is_action_just_pressed("shoot"):
|
||||||
print("Player wants to shoot")
|
print("Player wants to shoot")
|
||||||
@ -71,6 +75,10 @@ func handle_animation()->void:
|
|||||||
player_graphic.play("jumping")
|
player_graphic.play("jumping")
|
||||||
PlayerState.FALLING:
|
PlayerState.FALLING:
|
||||||
player_graphic.play("falling")
|
player_graphic.play("falling")
|
||||||
|
PlayerState.HURT:
|
||||||
|
player_graphic.play("hurt")
|
||||||
|
PlayerState.DEAD:
|
||||||
|
player_graphic.play("death")
|
||||||
|
|
||||||
func handle_movement(delta)->void:
|
func handle_movement(delta)->void:
|
||||||
# Add the gravity.
|
# Add the gravity.
|
||||||
@ -98,3 +106,13 @@ func _on_animation_finished() -> void:
|
|||||||
match current_player_state:
|
match current_player_state:
|
||||||
PlayerState.JUMPING:
|
PlayerState.JUMPING:
|
||||||
jumpUp = false
|
jumpUp = false
|
||||||
|
PlayerState.HURT:
|
||||||
|
current_player_state = PlayerState.IDLE
|
||||||
|
PlayerState.DEAD:
|
||||||
|
deathAnimationCompleteSignal.emit()
|
||||||
|
|
||||||
|
func playerDamage(health, maxHealth) ->void:
|
||||||
|
current_player_state = PlayerState.HURT
|
||||||
|
func playerDead()->void:
|
||||||
|
print("Player should die")
|
||||||
|
current_player_state = PlayerState.DEAD
|
||||||
|
|||||||
11
scripts/rscs/characterStats.gd
Normal file
11
scripts/rscs/characterStats.gd
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
class_name CharacterStats 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/characterStats.gd.uid
Normal file
1
scripts/rscs/characterStats.gd.uid
Normal file
@ -0,0 +1 @@
|
|||||||
|
uid://jdmo742f5t43
|
||||||
7
scripts/rscs/playerStats.tres
Normal file
7
scripts/rscs/playerStats.tres
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[gd_resource type="Resource" script_class="CharacterStats" format=3 uid="uid://b6qxf7j8kcw7f"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://jdmo742f5t43" path="res://scripts/rscs/characterStats.gd" id="1_sqkfu"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_sqkfu")
|
||||||
|
metadata/_custom_type_script = "uid://jdmo742f5t43"
|
||||||
12
scripts/rscs/slimeStats.tres
Normal file
12
scripts/rscs/slimeStats.tres
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[gd_resource type="Resource" script_class="CharacterStats" format=3 uid="uid://qpkg5xp8sk1a"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://jdmo742f5t43" path="res://scripts/rscs/characterStats.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://jdmo742f5t43"
|
||||||
@ -4,6 +4,8 @@ class_name SceneManager extends Node2D
|
|||||||
@onready var level: Node2D = $"../Level"
|
@onready var level: Node2D = $"../Level"
|
||||||
@onready var coins: Node2D = $"../Coins"
|
@onready var coins: Node2D = $"../Coins"
|
||||||
@onready var slimes: Node2D = $"../Slimes"
|
@onready var slimes: Node2D = $"../Slimes"
|
||||||
|
@onready var player: Player = $"../Player"
|
||||||
|
@onready var ui: UI = $"../CanvasLayer/ui"
|
||||||
|
|
||||||
var bullet = preload("res://scenes/bullet.tscn")
|
var bullet = preload("res://scenes/bullet.tscn")
|
||||||
var bulletArray:Array[Bullet] = []
|
var bulletArray:Array[Bullet] = []
|
||||||
@ -20,7 +22,10 @@ func _ready() -> void:
|
|||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
func _process(delta: float) -> void:
|
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:
|
func buildLevel()->void:
|
||||||
print("building level")
|
print("building level")
|
||||||
@ -33,6 +38,13 @@ func buildLevel()->void:
|
|||||||
Gamecontroller.destroySignal.connect(destroy)
|
Gamecontroller.destroySignal.connect(destroy)
|
||||||
Gamecontroller.teleportSignal.connect(teleport)
|
Gamecontroller.teleportSignal.connect(teleport)
|
||||||
Gamecontroller.levelChangeSignal.connect(loadLevel)
|
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.coinCollectedSignal.connect(ui.updateCoins)
|
||||||
|
player.deathAnimationCompleteSignal.connect(Gamecontroller.loadLevel)
|
||||||
|
|
||||||
func updateEnemies()->void:
|
func updateEnemies()->void:
|
||||||
if slimes:
|
if slimes:
|
||||||
var totalSlimes = 0
|
var totalSlimes = 0
|
||||||
|
|||||||
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/coiins
|
||||||
|
|
||||||
|
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, coinsRemaining)->void:
|
||||||
|
coins.text= str(collectedCoins)+" of "+str(coinsRemaining+collectedCoins)
|
||||||
1
scripts/ui.gd.uid
Normal file
1
scripts/ui.gd.uid
Normal file
@ -0,0 +1 @@
|
|||||||
|
uid://6tbvoaj20pws
|
||||||
Loading…
Reference in New Issue
Block a user