master
DJh2o2 2024-05-16 13:03:13 +07:00
commit 418c48a038
47 changed files with 1348 additions and 0 deletions

2
.gitattributes vendored

@ -0,0 +1,2 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf

3
.gitignore vendored

@ -0,0 +1,3 @@
# Godot 4+ specific ignores
.godot/
android/

@ -0,0 +1,34 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://cd230b0edvmwv"
path="res://.godot/imported/PixelOperator8-Bold.ttf-74faf550739674ad3170f08e646e0614.fontdata"
[deps]
source_file="res://assets/fonts/PixelOperator8-Bold.ttf"
dest_files=["res://.godot/imported/PixelOperator8-Bold.ttf-74faf550739674ad3170f08e646e0614.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
hinting=1
subpixel_positioning=1
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

Binary file not shown.

@ -0,0 +1,34 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://j3litmo78ydo"
path="res://.godot/imported/PixelOperator8.ttf-6f9f01766aff16f52046b880ffb8d367.fontdata"
[deps]
source_file="res://assets/fonts/PixelOperator8.ttf"
dest_files=["res://.godot/imported/PixelOperator8.ttf-6f9f01766aff16f52046b880ffb8d367.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
hinting=1
subpixel_positioning=1
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://bb32uiv2inoam"
path="res://.godot/imported/time_for_adventure.mp3-b8a49ae1cfc83b211be9d82e6e985655.mp3str"
[deps]
source_file="res://assets/music/time_for_adventure.mp3"
dest_files=["res://.godot/imported/time_for_adventure.mp3-b8a49ae1cfc83b211be9d82e6e985655.mp3str"]
[params]
loop=true
loop_offset=0.0
bpm=0.0
beat_count=0
bar_beats=4

Binary file not shown.

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://2bveqexi5ulv"
path="res://.godot/imported/coin.wav-9081ee1c6d81d9c34d08bc916297b892.sample"
[deps]
source_file="res://assets/sounds/coin.wav"
dest_files=["res://.godot/imported/coin.wav-9081ee1c6d81d9c34d08bc916297b892.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

Binary file not shown.

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://b8deilfasdvio"
path="res://.godot/imported/explosion.wav-52e05e8d4b6600106c8dde082c90f915.sample"
[deps]
source_file="res://assets/sounds/explosion.wav"
dest_files=["res://.godot/imported/explosion.wav-52e05e8d4b6600106c8dde082c90f915.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

Binary file not shown.

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://d22aad5e5anba"
path="res://.godot/imported/hurt.wav-792baeb99505afd6a1496d4e4330b023.sample"
[deps]
source_file="res://assets/sounds/hurt.wav"
dest_files=["res://.godot/imported/hurt.wav-792baeb99505afd6a1496d4e4330b023.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

Binary file not shown.

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://c6jhfqgadp8cf"
path="res://.godot/imported/jump.wav-395b727cde98999423d5c020c9c3492f.sample"
[deps]
source_file="res://assets/sounds/jump.wav"
dest_files=["res://.godot/imported/jump.wav-395b727cde98999423d5c020c9c3492f.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

Binary file not shown.

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://2vjtwrx83evc"
path="res://.godot/imported/power_up.wav-8349ffe570559470036ebff4b80f7fc0.sample"
[deps]
source_file="res://assets/sounds/power_up.wav"
dest_files=["res://.godot/imported/power_up.wav-8349ffe570559470036ebff4b80f7fc0.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

Binary file not shown.

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://cvvjdi142a0vn"
path="res://.godot/imported/tap.wav-78d4c5a48b21a853d89bec74f20510e7.sample"
[deps]
source_file="res://assets/sounds/tap.wav"
dest_files=["res://.godot/imported/tap.wav-78d4c5a48b21a853d89bec74f20510e7.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://j1vvmqmgn5hq"
path="res://.godot/imported/coin.png-c8309bf0f8fb5f3a7d1e96a4eb3f02ce.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/coin.png"
dest_files=["res://.godot/imported/coin.png-c8309bf0f8fb5f3a7d1e96a4eb3f02ce.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dm1k5pweip200"
path="res://.godot/imported/fruit.png-3735163b668af10c2b35b52cba81b68a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/fruit.png"
dest_files=["res://.godot/imported/fruit.png-3735163b668af10c2b35b52cba81b68a.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://rreep3laiho3"
path="res://.godot/imported/knight.png-7c67c83d34932624952797d9e971a644.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/knight.png"
dest_files=["res://.godot/imported/knight.png-7c67c83d34932624952797d9e971a644.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dkwgdc3tgllcv"
path="res://.godot/imported/platforms.png-3869606db457611ed4193d705dc364e4.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/platforms.png"
dest_files=["res://.godot/imported/platforms.png-3869606db457611ed4193d705dc364e4.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

Binary file not shown.

After

Width:  |  Height:  |  Size: 908 B

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://drp8m0ya7dy8d"
path="res://.godot/imported/slime_green.png-f6349164bf3a0f5189bb927b97af9c58.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/slime_green.png"
dest_files=["res://.godot/imported/slime_green.png-f6349164bf3a0f5189bb927b97af9c58.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cxf5e6blqgh03"
path="res://.godot/imported/slime_purple.png-26dc5ddef235ce6a400e78e0d532b050.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/slime_purple.png"
dest_files=["res://.godot/imported/slime_purple.png-26dc5ddef235ce6a400e78e0d532b050.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://buys6ooyytlxw"
path="res://.godot/imported/world_tileset.png-61a32465f33c3d9d3bfecb75b6485009.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/sprites/world_tileset.png"
dest_files=["res://.godot/imported/world_tileset.png-61a32465f33c3d9d3bfecb75b6485009.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
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/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

@ -0,0 +1,15 @@
[gd_resource type="AudioBusLayout" format=3 uid="uid://bd3jfxet0pk5h"]
[resource]
bus/1/name = &"Music"
bus/1/solo = false
bus/1/mute = false
bus/1/bypass_fx = false
bus/1/volume_db = -5.93075
bus/1/send = &"Master"
bus/2/name = &"SFX"
bus/2/solo = false
bus/2/mute = false
bus/2/bypass_fx = false
bus/2/volume_db = 0.0
bus/2/send = &"Master"

@ -0,0 +1,51 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=5
[application]
config/name="Princess Dragon Slayer"
run/main_scene="res://scenes/game.tscn"
config/features=PackedStringArray("4.3", "Forward Plus")
[autoload]
Music="*res://scenes/music.tscn"
[file_customization]
folder_colors={
"res://assets/": "blue",
"res://scenes/": "green",
"res://scripts/": "red"
}
[input]
jump={
"deadzone": 0.5,
"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":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null)
]
}
move_left={
"deadzone": 0.5,
"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":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null)
, 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":4194319,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
move_right={
"deadzone": 0.5,
"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":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null)
, 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":4194321,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
[rendering]
textures/canvas_textures/default_texture_filter=0

@ -0,0 +1,222 @@
[gd_scene load_steps=21 format=3 uid="uid://b314kt4tvhykm"]
[ext_resource type="Script" path="res://scripts/coin.gd" id="1_1bch4"]
[ext_resource type="Texture2D" uid="uid://j1vvmqmgn5hq" path="res://assets/sprites/coin.png" id="1_uju15"]
[ext_resource type="AudioStream" uid="uid://2bveqexi5ulv" path="res://assets/sounds/coin.wav" id="3_u3aqb"]
[sub_resource type="AtlasTexture" id="AtlasTexture_cimk1"]
atlas = ExtResource("1_uju15")
region = Rect2(0, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_3qa5b"]
atlas = ExtResource("1_uju15")
region = Rect2(16, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_8csxu"]
atlas = ExtResource("1_uju15")
region = Rect2(32, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_d03o6"]
atlas = ExtResource("1_uju15")
region = Rect2(48, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_k5bvt"]
atlas = ExtResource("1_uju15")
region = Rect2(64, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_kgvjo"]
atlas = ExtResource("1_uju15")
region = Rect2(80, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_rekbt"]
atlas = ExtResource("1_uju15")
region = Rect2(96, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_gx4hy"]
atlas = ExtResource("1_uju15")
region = Rect2(112, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_bt8qy"]
atlas = ExtResource("1_uju15")
region = Rect2(128, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_5m4jm"]
atlas = ExtResource("1_uju15")
region = Rect2(144, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_ftg62"]
atlas = ExtResource("1_uju15")
region = Rect2(160, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_m8fl6"]
atlas = ExtResource("1_uju15")
region = Rect2(176, 0, 16, 16)
[sub_resource type="SpriteFrames" id="SpriteFrames_qqi1d"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_cimk1")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_3qa5b")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_8csxu")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_d03o6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_k5bvt")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_kgvjo")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_rekbt")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_gx4hy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_bt8qy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_5m4jm")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ftg62")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_m8fl6")
}],
"loop": true,
"name": &"default",
"speed": 10.0
}]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_wugld"]
radius = 5.0
height = 10.0
[sub_resource type="Animation" id="Animation_l41fi"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("AnimatedSprite2D:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("CollisionShape2D:disabled")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("AudioStreamPlayer2D:playing")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="Animation" id="Animation_djd7n"]
resource_name = "collect"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("AnimatedSprite2D:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("CollisionShape2D:disabled")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("AudioStreamPlayer2D:playing")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/3/type = "method"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath(".")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(1),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"queue_free"
}]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_kby16"]
_data = {
"RESET": SubResource("Animation_l41fi"),
"collect": SubResource("Animation_djd7n")
}
[node name="Coin" type="Area2D"]
collision_layer = 0
collision_mask = 2
script = ExtResource("1_1bch4")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_qqi1d")
autoplay = "default"
frame_progress = 0.665027
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CapsuleShape2D_wugld")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_kby16")
}
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource("3_u3aqb")
[connection signal="body_entered" from="." to="." method="_on_body_entered"]

File diff suppressed because one or more lines are too long

@ -0,0 +1,11 @@
[gd_scene load_steps=2 format=3 uid="uid://c8vg7vpkhoelf"]
[ext_resource type="AudioStream" uid="uid://bb32uiv2inoam" path="res://assets/music/time_for_adventure.mp3" id="1_miocp"]
[node name="Music" type="Node2D"]
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
position = Vector2(4, 0)
stream = ExtResource("1_miocp")
autoplay = true
bus = &"Music"

@ -0,0 +1,17 @@
[gd_scene load_steps=3 format=3 uid="uid://cgg02cx7s7xqo"]
[ext_resource type="Texture2D" uid="uid://dkwgdc3tgllcv" path="res://assets/sprites/platforms.png" id="1_kldyh"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_tij6p"]
size = Vector2(30, 7)
[node name="Platform" type="StaticBody2D"]
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("1_kldyh")
region_enabled = true
region_rect = Rect2(16.0294, 0, 32.2448, 9.32473)
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_tij6p")
one_way_collision = true

@ -0,0 +1,236 @@
[gd_scene load_steps=33 format=3 uid="uid://r1ex2hm0w68w"]
[ext_resource type="Texture2D" uid="uid://rreep3laiho3" path="res://assets/sprites/knight.png" id="1_bdpdo"]
[ext_resource type="Script" path="res://scripts/player.gd" id="1_ttddr"]
[sub_resource type="CircleShape2D" id="CircleShape2D_flmdw"]
radius = 6.08276
[sub_resource type="AtlasTexture" id="AtlasTexture_khi4m"]
atlas = ExtResource("1_bdpdo")
region = Rect2(0, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_b6rxo"]
atlas = ExtResource("1_bdpdo")
region = Rect2(32, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_rxxsx"]
atlas = ExtResource("1_bdpdo")
region = Rect2(64, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_aqn6i"]
atlas = ExtResource("1_bdpdo")
region = Rect2(96, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_adjag"]
atlas = ExtResource("1_bdpdo")
region = Rect2(0, 160, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_38xna"]
atlas = ExtResource("1_bdpdo")
region = Rect2(32, 160, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_r5svv"]
atlas = ExtResource("1_bdpdo")
region = Rect2(64, 160, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_ls2a4"]
atlas = ExtResource("1_bdpdo")
region = Rect2(96, 160, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_5ncli"]
atlas = ExtResource("1_bdpdo")
region = Rect2(128, 160, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_k3i8h"]
atlas = ExtResource("1_bdpdo")
region = Rect2(160, 160, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_tms7b"]
atlas = ExtResource("1_bdpdo")
region = Rect2(192, 160, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_xitvk"]
atlas = ExtResource("1_bdpdo")
region = Rect2(224, 160, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_l1urg"]
atlas = ExtResource("1_bdpdo")
region = Rect2(0, 64, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_jpa7q"]
atlas = ExtResource("1_bdpdo")
region = Rect2(32, 64, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_50l3e"]
atlas = ExtResource("1_bdpdo")
region = Rect2(64, 64, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_e1lxk"]
atlas = ExtResource("1_bdpdo")
region = Rect2(96, 64, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_suufl"]
atlas = ExtResource("1_bdpdo")
region = Rect2(128, 64, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_lu04q"]
atlas = ExtResource("1_bdpdo")
region = Rect2(160, 64, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_jdlrl"]
atlas = ExtResource("1_bdpdo")
region = Rect2(192, 64, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_k7asf"]
atlas = ExtResource("1_bdpdo")
region = Rect2(224, 64, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_ncdm3"]
atlas = ExtResource("1_bdpdo")
region = Rect2(0, 96, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_xsfv4"]
atlas = ExtResource("1_bdpdo")
region = Rect2(32, 96, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_ngoxg"]
atlas = ExtResource("1_bdpdo")
region = Rect2(64, 96, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_0qpvs"]
atlas = ExtResource("1_bdpdo")
region = Rect2(96, 96, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_c0i1o"]
atlas = ExtResource("1_bdpdo")
region = Rect2(128, 96, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_yf7yy"]
atlas = ExtResource("1_bdpdo")
region = Rect2(160, 96, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_6k6qs"]
atlas = ExtResource("1_bdpdo")
region = Rect2(192, 96, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_woy78"]
atlas = ExtResource("1_bdpdo")
region = Rect2(224, 96, 32, 32)
[sub_resource type="SpriteFrames" id="SpriteFrames_5pxeq"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_khi4m")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_b6rxo")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_rxxsx")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_aqn6i")
}],
"loop": true,
"name": &"idle",
"speed": 10.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_adjag")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_38xna")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_r5svv")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ls2a4")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_5ncli")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_k3i8h")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tms7b")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xitvk")
}],
"loop": true,
"name": &"jump",
"speed": 10.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_l1urg")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jpa7q")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_50l3e")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_e1lxk")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_suufl")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_lu04q")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jdlrl")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_k7asf")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ncdm3")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xsfv4")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ngoxg")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_0qpvs")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_c0i1o")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_yf7yy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_6k6qs")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_woy78")
}],
"loop": true,
"name": &"run",
"speed": 10.0
}]
[node name="Player" type="CharacterBody2D"]
z_index = 5
collision_layer = 2
script = ExtResource("1_ttddr")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, 6)
shape = SubResource("CircleShape2D_flmdw")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_5pxeq")
animation = &"jump"
autoplay = "idle"
frame_progress = 0.149237

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Rider ignored files
/contentModel.xml
/projectSettingsUpdater.xml
/modules.xml
/.idea.scripts.iml

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>

@ -0,0 +1,8 @@
extends Area2D
@onready var animation_player: AnimationPlayer = $AnimationPlayer
@onready var game_manager: Node = %GameManager
func _on_body_entered(_body: Node2D) -> void:
game_manager.collect_coin()
animation_player.play("collect")

@ -0,0 +1,7 @@
extends Node
var score = 0
func collect_coin():
score += 1
print("Score: " + str(score))

@ -0,0 +1,4 @@
extends Area2D
func _on_body_entered(_body: Node2D) -> void:
get_tree().reload_current_scene()

@ -0,0 +1,41 @@
extends CharacterBody2D
const SPEED = 100.0
const JUMP_VELOCITY = -260.0
@onready var animated_sprite: AnimatedSprite2D = $AnimatedSprite2D
func _physics_process(delta: float) -> void:
# Add the gravity.
if not is_on_floor():
velocity += get_gravity() * delta
# Handle jump.
if Input.is_action_just_pressed("jump") and is_on_floor():
velocity.y = JUMP_VELOCITY
# Get the input direction
var direction := Input.get_axis("move_left", "move_right")
# Flip the sprite
if direction > 0:
animated_sprite.flip_h = false
elif direction < 0:
animated_sprite.flip_h = true
# Play animations
if is_on_floor():
if direction == 0:
animated_sprite.play("idle")
else:
animated_sprite.play("run")
else:
animated_sprite.play("jump")
# Move the character
if direction:
velocity.x = direction * SPEED
else:
velocity.x = move_toward(velocity.x, 0, SPEED)
move_and_slide()