implemented enemy spawn logik and witch chasing

pull/1/head
Artur 2026-04-12 18:27:14 +02:00
parent e3f8e114a8
commit b0752b1d92
32 changed files with 919 additions and 63 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c6g5js6dqk0r4"
path="res://.godot/imported/witch-001-NESW.png-06a83e3cc7359eddbb119bac639a2ef8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Witch/PNG/24x32/witch-001-NESW.png"
dest_files=["res://.godot/imported/witch-001-NESW.png-06a83e3cc7359eddbb119bac639a2ef8.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dtcoy2v0cunik"
path="res://.godot/imported/witch-001-SWEN.png-f5bf6ee99bd66213b239842c47b7b93a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Witch/PNG/24x32/witch-001-SWEN.png"
dest_files=["res://.godot/imported/witch-001-SWEN.png-f5bf6ee99bd66213b239842c47b7b93a.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://4hvq8r8th04t"
path="res://.godot/imported/witch-002-NESW.png-4f2bafd1a4c953a94c33817fb6157ba0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Witch/PNG/24x32/witch-002-NESW.png"
dest_files=["res://.godot/imported/witch-002-NESW.png-4f2bafd1a4c953a94c33817fb6157ba0.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dw8pn36yok5jq"
path="res://.godot/imported/witch-002-SWEN.png-5c0bbe8c18a04fbfd2ca6ed66fa115b5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Witch/PNG/24x32/witch-002-SWEN.png"
dest_files=["res://.godot/imported/witch-002-SWEN.png-5c0bbe8c18a04fbfd2ca6ed66fa115b5.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ntthr07qfsd5"
path="res://.godot/imported/witch-001-NESW.png-518d124935c5c63afd25cef9511ac701.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Witch/PNG/48x64_scale/witch-001-NESW.png"
dest_files=["res://.godot/imported/witch-001-NESW.png-518d124935c5c63afd25cef9511ac701.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://exy1fhwu3xea"
path="res://.godot/imported/witch-001-SWEN.png-afd78de9dbf766921c3ed2cab9b43e34.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Witch/PNG/48x64_scale/witch-001-SWEN.png"
dest_files=["res://.godot/imported/witch-001-SWEN.png-afd78de9dbf766921c3ed2cab9b43e34.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c5mbaxv3hyswk"
path="res://.godot/imported/witch-002-NESW.png-e8aec8659910159925322790c67f8359.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Witch/PNG/48x64_scale/witch-002-NESW.png"
dest_files=["res://.godot/imported/witch-002-NESW.png-e8aec8659910159925322790c67f8359.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://rb03m0fdbyog"
path="res://.godot/imported/witch-002-SWEN.png-322be86f34e14d82b7b00156e4f5dac2.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Witch/PNG/48x64_scale/witch-002-SWEN.png"
dest_files=["res://.godot/imported/witch-002-SWEN.png-322be86f34e14d82b7b00156e4f5dac2.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ddbbt4gtbylhm"
path="res://.godot/imported/witch-001-NESW.png-79d1c3b4a6521717c803191e572c7222.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Witch/PNG/48x64_scale2x/witch-001-NESW.png"
dest_files=["res://.godot/imported/witch-001-NESW.png-79d1c3b4a6521717c803191e572c7222.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b2h2kqw57q64v"
path="res://.godot/imported/witch-001-SWEN.png-fcdcb618a7226622b1a9ef099b58031e.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Witch/PNG/48x64_scale2x/witch-001-SWEN.png"
dest_files=["res://.godot/imported/witch-001-SWEN.png-fcdcb618a7226622b1a9ef099b58031e.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dfx43xvthf5x2"
path="res://.godot/imported/witch-002-NESW.png-cd52aea79d7f831fc4d2e1f6a7b8e222.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Witch/PNG/48x64_scale2x/witch-002-NESW.png"
dest_files=["res://.godot/imported/witch-002-NESW.png-cd52aea79d7f831fc4d2e1f6a7b8e222.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bv62257xcotqj"
path="res://.godot/imported/witch-002-SWEN.png-b6ccf49780d7c4b7bab31228c747ced7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Witch/PNG/48x64_scale2x/witch-002-SWEN.png"
dest_files=["res://.godot/imported/witch-002-SWEN.png-b6ccf49780d7c4b7bab31228c747ced7.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

View File

@ -17,6 +17,8 @@ config/icon="res://assets/icon.svg"
[display] [display]
window/size/viewport_width=1280
window/size/viewport_height=720
window/size/window_width_override=1280 window/size/window_width_override=1280
window/size/window_height_override=720 window/size/window_height_override=720
window/stretch/mode="viewport" window/stretch/mode="viewport"

View File

@ -5,6 +5,8 @@
[ext_resource type="Texture2D" uid="uid://0xu8ohipv2mj" path="res://assets/tileset/Tiled_files/Objects.png" id="3_iywne"] [ext_resource type="Texture2D" uid="uid://0xu8ohipv2mj" path="res://assets/tileset/Tiled_files/Objects.png" id="3_iywne"]
[ext_resource type="Texture2D" uid="uid://c4i3fnr6gpjp" path="res://assets/tileset/Tiled_files/details.png" id="4_p57ef"] [ext_resource type="Texture2D" uid="uid://c4i3fnr6gpjp" path="res://assets/tileset/Tiled_files/details.png" id="4_p57ef"]
[ext_resource type="PackedScene" uid="uid://cfmfvahk6gua1" path="res://scenes/background.tscn" id="5_iywne"] [ext_resource type="PackedScene" uid="uid://cfmfvahk6gua1" path="res://scenes/background.tscn" id="5_iywne"]
[ext_resource type="Script" uid="uid://dovkm6w8af08x" path="res://scripts/spawn_control.gd" id="6_p57ef"]
[ext_resource type="PackedScene" uid="uid://b4v0ntaukg2je" path="res://scenes/witch.tscn" id="7_u5sy4"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_u5sy4"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_u5sy4"]
texture = ExtResource("2_lbhrr") texture = ExtResource("2_lbhrr")
@ -3421,3 +3423,18 @@ zoom = Vector2(1.9, 1.9)
[node name="Background" parent="." unique_id=909153226 instance=ExtResource("5_iywne")] [node name="Background" parent="." unique_id=909153226 instance=ExtResource("5_iywne")]
z_index = -1 z_index = -1
[node name="SpawnControl" type="Control" parent="." unique_id=1780647990]
layout_mode = 3
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
script = ExtResource("6_p57ef")
[node name="SpawnTimer" type="Timer" parent="." unique_id=1852920556]
autostart = true
[node name="Witch" parent="." unique_id=1188927311 instance=ExtResource("7_u5sy4")]
position = Vector2(304, 164)
[connection signal="timeout" from="SpawnTimer" to="SpawnControl" method="_on_spawn_timer_timeout"]

View File

@ -1,202 +1,203 @@
[gd_scene format=3 uid="uid://mf2tv5xv5juf"] [gd_scene format=3 uid="uid://ccotbw7gepsge"]
[ext_resource type="Texture2D" uid="uid://cxddvfs2wfwcl" path="res://assets/Slime1/Without_shadow/Slime1_Idle_without_shadow.png" id="1_371uh"] [ext_resource type="Script" uid="uid://1drpgylrgrjj" path="res://scripts/slime.gd" id="1_1a61f"]
[ext_resource type="Texture2D" uid="uid://e3ihc570p1n0" path="res://assets/Slime1/Without_shadow/Slime1_Death_without_shadow.png" id="1_n6pvg"] [ext_resource type="Texture2D" uid="uid://e3ihc570p1n0" path="res://assets/Slime1/Without_shadow/Slime1_Death_without_shadow.png" id="2_kjhlw"]
[ext_resource type="Texture2D" uid="uid://b2bmw70co6noy" path="res://assets/Slime1/Without_shadow/Slime1_Walk_without_shadow.png" id="3_pjw23"] [ext_resource type="Texture2D" uid="uid://cxddvfs2wfwcl" path="res://assets/Slime1/Without_shadow/Slime1_Idle_without_shadow.png" id="3_rrqju"]
[ext_resource type="Texture2D" uid="uid://b2bmw70co6noy" path="res://assets/Slime1/Without_shadow/Slime1_Walk_without_shadow.png" id="4_wyhst"]
[sub_resource type="AtlasTexture" id="AtlasTexture_v5wyi"] [sub_resource type="AtlasTexture" id="AtlasTexture_v5wyi"]
atlas = ExtResource("1_n6pvg") atlas = ExtResource("2_kjhlw")
region = Rect2(0, 0, 64, 64) region = Rect2(0, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_0l8pv"] [sub_resource type="AtlasTexture" id="AtlasTexture_0l8pv"]
atlas = ExtResource("1_n6pvg") atlas = ExtResource("2_kjhlw")
region = Rect2(64, 0, 64, 64) region = Rect2(64, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_vnioy"] [sub_resource type="AtlasTexture" id="AtlasTexture_vnioy"]
atlas = ExtResource("1_n6pvg") atlas = ExtResource("2_kjhlw")
region = Rect2(128, 0, 64, 64) region = Rect2(128, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_2xjuo"] [sub_resource type="AtlasTexture" id="AtlasTexture_2xjuo"]
atlas = ExtResource("1_n6pvg") atlas = ExtResource("2_kjhlw")
region = Rect2(192, 0, 64, 64) region = Rect2(192, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_a02ik"] [sub_resource type="AtlasTexture" id="AtlasTexture_a02ik"]
atlas = ExtResource("1_n6pvg") atlas = ExtResource("2_kjhlw")
region = Rect2(256, 0, 64, 64) region = Rect2(256, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_pu8ps"] [sub_resource type="AtlasTexture" id="AtlasTexture_pu8ps"]
atlas = ExtResource("1_n6pvg") atlas = ExtResource("2_kjhlw")
region = Rect2(320, 0, 64, 64) region = Rect2(320, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_g40cl"] [sub_resource type="AtlasTexture" id="AtlasTexture_g40cl"]
atlas = ExtResource("1_n6pvg") atlas = ExtResource("2_kjhlw")
region = Rect2(384, 0, 64, 64) region = Rect2(384, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_cxm07"] [sub_resource type="AtlasTexture" id="AtlasTexture_cxm07"]
atlas = ExtResource("1_n6pvg") atlas = ExtResource("2_kjhlw")
region = Rect2(448, 0, 64, 64) region = Rect2(448, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_g2qvl"] [sub_resource type="AtlasTexture" id="AtlasTexture_g2qvl"]
atlas = ExtResource("1_n6pvg") atlas = ExtResource("2_kjhlw")
region = Rect2(512, 0, 64, 64) region = Rect2(512, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_tyl0w"] [sub_resource type="AtlasTexture" id="AtlasTexture_tyl0w"]
atlas = ExtResource("1_n6pvg") atlas = ExtResource("2_kjhlw")
region = Rect2(576, 0, 64, 64) region = Rect2(576, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_p2gj0"] [sub_resource type="AtlasTexture" id="AtlasTexture_p2gj0"]
atlas = ExtResource("1_371uh") atlas = ExtResource("3_rrqju")
region = Rect2(0, 0, 64, 64) region = Rect2(0, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_n6pvg"] [sub_resource type="AtlasTexture" id="AtlasTexture_n6pvg"]
atlas = ExtResource("1_371uh") atlas = ExtResource("3_rrqju")
region = Rect2(64, 0, 64, 64) region = Rect2(64, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_pjw23"] [sub_resource type="AtlasTexture" id="AtlasTexture_pjw23"]
atlas = ExtResource("1_371uh") atlas = ExtResource("3_rrqju")
region = Rect2(128, 0, 64, 64) region = Rect2(128, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_2npkn"] [sub_resource type="AtlasTexture" id="AtlasTexture_2npkn"]
atlas = ExtResource("1_371uh") atlas = ExtResource("3_rrqju")
region = Rect2(192, 0, 64, 64) region = Rect2(192, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_fd6lc"] [sub_resource type="AtlasTexture" id="AtlasTexture_fd6lc"]
atlas = ExtResource("1_371uh") atlas = ExtResource("3_rrqju")
region = Rect2(256, 0, 64, 64) region = Rect2(256, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_gstla"] [sub_resource type="AtlasTexture" id="AtlasTexture_gstla"]
atlas = ExtResource("1_371uh") atlas = ExtResource("3_rrqju")
region = Rect2(320, 0, 64, 64) region = Rect2(320, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_fur4c"] [sub_resource type="AtlasTexture" id="AtlasTexture_fur4c"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(0, 0, 64, 64) region = Rect2(0, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_2v7ff"] [sub_resource type="AtlasTexture" id="AtlasTexture_2v7ff"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(64, 0, 64, 64) region = Rect2(64, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_35t6e"] [sub_resource type="AtlasTexture" id="AtlasTexture_35t6e"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(128, 0, 64, 64) region = Rect2(128, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_pbccl"] [sub_resource type="AtlasTexture" id="AtlasTexture_pbccl"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(192, 0, 64, 64) region = Rect2(192, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_24adn"] [sub_resource type="AtlasTexture" id="AtlasTexture_24adn"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(256, 0, 64, 64) region = Rect2(256, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_w8bnk"] [sub_resource type="AtlasTexture" id="AtlasTexture_w8bnk"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(320, 0, 64, 64) region = Rect2(320, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_1kmbt"] [sub_resource type="AtlasTexture" id="AtlasTexture_1kmbt"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(384, 0, 64, 64) region = Rect2(384, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_a8sfj"] [sub_resource type="AtlasTexture" id="AtlasTexture_a8sfj"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(448, 0, 64, 64) region = Rect2(448, 0, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_kwlqs"] [sub_resource type="AtlasTexture" id="AtlasTexture_kwlqs"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(0, 128, 64, 64) region = Rect2(0, 128, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_qwlg4"] [sub_resource type="AtlasTexture" id="AtlasTexture_qwlg4"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(64, 128, 64, 64) region = Rect2(64, 128, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_1sdgb"] [sub_resource type="AtlasTexture" id="AtlasTexture_1sdgb"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(128, 128, 64, 64) region = Rect2(128, 128, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_rrr3x"] [sub_resource type="AtlasTexture" id="AtlasTexture_rrr3x"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(192, 128, 64, 64) region = Rect2(192, 128, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_eyfvk"] [sub_resource type="AtlasTexture" id="AtlasTexture_eyfvk"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(256, 128, 64, 64) region = Rect2(256, 128, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_iscye"] [sub_resource type="AtlasTexture" id="AtlasTexture_iscye"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(320, 128, 64, 64) region = Rect2(320, 128, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_aq06o"] [sub_resource type="AtlasTexture" id="AtlasTexture_aq06o"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(384, 128, 64, 64) region = Rect2(384, 128, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_3tc40"] [sub_resource type="AtlasTexture" id="AtlasTexture_3tc40"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(448, 128, 64, 64) region = Rect2(448, 128, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_klxi6"] [sub_resource type="AtlasTexture" id="AtlasTexture_klxi6"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(0, 192, 64, 64) region = Rect2(0, 192, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_0yeyc"] [sub_resource type="AtlasTexture" id="AtlasTexture_0yeyc"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(64, 192, 64, 64) region = Rect2(64, 192, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_t6mwi"] [sub_resource type="AtlasTexture" id="AtlasTexture_t6mwi"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(128, 192, 64, 64) region = Rect2(128, 192, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_7d6fo"] [sub_resource type="AtlasTexture" id="AtlasTexture_7d6fo"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(192, 192, 64, 64) region = Rect2(192, 192, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_rewg1"] [sub_resource type="AtlasTexture" id="AtlasTexture_rewg1"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(256, 192, 64, 64) region = Rect2(256, 192, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_h6x3v"] [sub_resource type="AtlasTexture" id="AtlasTexture_h6x3v"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(320, 192, 64, 64) region = Rect2(320, 192, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_sacx8"] [sub_resource type="AtlasTexture" id="AtlasTexture_sacx8"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(384, 192, 64, 64) region = Rect2(384, 192, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_jn7vh"] [sub_resource type="AtlasTexture" id="AtlasTexture_jn7vh"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(448, 192, 64, 64) region = Rect2(448, 192, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_rp1f2"] [sub_resource type="AtlasTexture" id="AtlasTexture_rp1f2"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(0, 64, 64, 64) region = Rect2(0, 64, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_mfrqf"] [sub_resource type="AtlasTexture" id="AtlasTexture_mfrqf"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(64, 64, 64, 64) region = Rect2(64, 64, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_nhl3i"] [sub_resource type="AtlasTexture" id="AtlasTexture_nhl3i"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(128, 64, 64, 64) region = Rect2(128, 64, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_4qj7p"] [sub_resource type="AtlasTexture" id="AtlasTexture_4qj7p"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(192, 64, 64, 64) region = Rect2(192, 64, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_kf0ob"] [sub_resource type="AtlasTexture" id="AtlasTexture_kf0ob"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(256, 64, 64, 64) region = Rect2(256, 64, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_txv6o"] [sub_resource type="AtlasTexture" id="AtlasTexture_txv6o"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(320, 64, 64, 64) region = Rect2(320, 64, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_kut4w"] [sub_resource type="AtlasTexture" id="AtlasTexture_kut4w"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(384, 64, 64, 64) region = Rect2(384, 64, 64, 64)
[sub_resource type="AtlasTexture" id="AtlasTexture_f1chl"] [sub_resource type="AtlasTexture" id="AtlasTexture_f1chl"]
atlas = ExtResource("3_pjw23") atlas = ExtResource("4_wyhst")
region = Rect2(448, 64, 64, 64) region = Rect2(448, 64, 64, 64)
[sub_resource type="SpriteFrames" id="SpriteFrames_v5wyi"] [sub_resource type="SpriteFrames" id="SpriteFrames_cbi0b"]
animations = [{ animations = [{
"frames": [{ "frames": [{
"duration": 1.0, "duration": 1.0,
@ -373,19 +374,18 @@ animations = [{
"speed": 10.0 "speed": 10.0
}] }]
[sub_resource type="CircleShape2D" id="CircleShape2D_0l8pv"] [sub_resource type="CircleShape2D" id="CircleShape2D_siike"]
radius = 7.071068 radius = 7.071068
[node name="Slime" type="Node2D" unique_id=684319753] [node name="Slime" type="CharacterBody2D" unique_id=1684858295]
script = ExtResource("1_1a61f")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=1810708302] [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=752118449]
texture_filter = 1 texture_filter = 1
sprite_frames = SubResource("SpriteFrames_v5wyi") sprite_frames = SubResource("SpriteFrames_cbi0b")
animation = &"walk_up" animation = &"walk_down"
frame_progress = 0.9794373 frame_progress = 0.2693989
[node name="Area2D" type="Area2D" parent="." unique_id=1893647464] [node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=769710804]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D" unique_id=1240163990]
position = Vector2(0, 1) position = Vector2(0, 1)
shape = SubResource("CircleShape2D_0l8pv") shape = SubResource("CircleShape2D_siike")

259
scenes/witch.tscn 100644
View File

@ -0,0 +1,259 @@
[gd_scene format=3 uid="uid://b4v0ntaukg2je"]
[ext_resource type="Texture2D" uid="uid://dw8pn36yok5jq" path="res://assets/Witch/PNG/24x32/witch-002-SWEN.png" id="1_hgjeu"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_gyfn7"]
radius = 6.0
height = 22.0
[sub_resource type="AtlasTexture" id="AtlasTexture_b1vsk"]
atlas = ExtResource("1_hgjeu")
region = Rect2(0, 64, 24, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_p6b3e"]
atlas = ExtResource("1_hgjeu")
region = Rect2(24, 64, 24, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_xk447"]
atlas = ExtResource("1_hgjeu")
region = Rect2(48, 64, 24, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_53435"]
atlas = ExtResource("1_hgjeu")
region = Rect2(0, 96, 24, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_qrkn2"]
atlas = ExtResource("1_hgjeu")
region = Rect2(24, 96, 24, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_vid1f"]
atlas = ExtResource("1_hgjeu")
region = Rect2(48, 96, 24, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_1g4oy"]
atlas = ExtResource("1_hgjeu")
region = Rect2(0, 0, 24, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_80ajc"]
atlas = ExtResource("1_hgjeu")
region = Rect2(24, 0, 24, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_tw4fk"]
atlas = ExtResource("1_hgjeu")
region = Rect2(48, 0, 24, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_3scmd"]
atlas = ExtResource("1_hgjeu")
region = Rect2(0, 32, 24, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_xb01y"]
atlas = ExtResource("1_hgjeu")
region = Rect2(24, 32, 24, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_aspqt"]
atlas = ExtResource("1_hgjeu")
region = Rect2(48, 32, 24, 32)
[sub_resource type="SpriteFrames" id="SpriteFrames_f4ghg"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_b1vsk")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_b1vsk")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_b1vsk")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_b1vsk")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_b1vsk")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_p6b3e")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_p6b3e")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xk447")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xk447")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xk447")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xk447")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xk447")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_p6b3e")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_p6b3e")
}],
"loop": true,
"name": &"east",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_53435")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_53435")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_53435")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_53435")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_53435")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_qrkn2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_qrkn2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_vid1f")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_vid1f")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_vid1f")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_vid1f")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_vid1f")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_qrkn2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_qrkn2")
}],
"loop": true,
"name": &"north",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_1g4oy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1g4oy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1g4oy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1g4oy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1g4oy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_80ajc")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_80ajc")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tw4fk")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tw4fk")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tw4fk")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tw4fk")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tw4fk")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_80ajc")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_80ajc")
}],
"loop": true,
"name": &"south",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_3scmd")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_3scmd")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_3scmd")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_3scmd")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_3scmd")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xb01y")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xb01y")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_aspqt")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_aspqt")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_aspqt")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_aspqt")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_aspqt")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xb01y")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xb01y")
}],
"loop": true,
"name": &"west",
"speed": 5.0
}]
[node name="Witch" type="CharacterBody2D" unique_id=1188927311]
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=774888103]
position = Vector2(0, 3)
shape = SubResource("CapsuleShape2D_gyfn7")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=698352033]
texture_filter = 1
sprite_frames = SubResource("SpriteFrames_f4ghg")
animation = &"south"
autoplay = "south"
frame_progress = 0.9113742

35
scripts/slime.gd 100644
View File

@ -0,0 +1,35 @@
extends CharacterBody2D
@onready var animated_sprite_2d: AnimatedSprite2D = $AnimatedSprite2D
var speed = 0.04
var player
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
player = get_node("/root/Game/Witch")
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
_chase_witch()
pass
func _chase_witch() -> void:
var direction = Vector2(player.global_position - global_position)
velocity = direction * speed
velocity = direction * speed
if direction == Vector2.ZERO:
animated_sprite_2d.play("idle")
elif abs(direction.x) >= abs(direction.y):
if direction.x < 0:
animated_sprite_2d.play("walk_left")
else:
animated_sprite_2d.play("walk_right")
else:
if direction.y < 0:
animated_sprite_2d.play("walk_up")
else:
animated_sprite_2d.play("walk_down")
move_and_slide()

View File

@ -0,0 +1 @@
uid://1drpgylrgrjj

View File

@ -0,0 +1,61 @@
extends Control
var up_left
var down_right
var up_right
var down_left
var viewport_rect
func _ready() -> void:
viewport_rect = get_viewport_rect()
print(get_viewport_rect())
up_left = viewport_rect.position
down_right = viewport_rect.end
up_right = Vector2(viewport_rect.end.x, viewport_rect.position.y)
down_left = Vector2(viewport_rect.position.x, viewport_rect.end.y)
print(up_left)
print(up_right)
print(down_left)
print(down_right)
print(get_spawn_position())
pass # Replace with function body.
func get_spawn_position() -> Vector2:
var side = randi() % 4
var spawn_x
var spawn_y
if side == 0:
# oben
spawn_x = randf_range(up_left.x, up_right.x)
spawn_y = up_left.y
elif side == 1:
# rechts
spawn_x = up_right.x +50
spawn_y = randf_range(up_right.y, down_right.y)
elif side == 2:
#unten
spawn_x = randf_range(up_left.x, up_right.x)
spawn_y = down_left.y
elif side == 3:
#links
spawn_x = up_left.x
spawn_y = randf_range(up_right.y, down_right.y)
return Vector2(spawn_x, spawn_y)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func spawn_enemy() -> void:
var enemy_scene = preload("res://scenes/slime.tscn")
var enemy = enemy_scene.instantiate()
enemy.global_position = get_spawn_position()
add_child(enemy)
pass
func _on_spawn_timer_timeout() -> void:
spawn_enemy()
pass # Replace with function body.

View File

@ -0,0 +1 @@
uid://dovkm6w8af08x