diff --git a/art/Owlet_Monster_Idle_4.png b/art/characters/Owlet_Monster_Idle_4.png similarity index 100% rename from art/Owlet_Monster_Idle_4.png rename to art/characters/Owlet_Monster_Idle_4.png diff --git a/art/Owlet_Monster_Idle_4.png.import b/art/characters/Owlet_Monster_Idle_4.png.import similarity index 68% rename from art/Owlet_Monster_Idle_4.png.import rename to art/characters/Owlet_Monster_Idle_4.png.import index fd35759..5718559 100644 --- a/art/Owlet_Monster_Idle_4.png.import +++ b/art/characters/Owlet_Monster_Idle_4.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://bi7ceeuwhg5mp" -path="res://.godot/imported/Owlet_Monster_Idle_4.png-e97c7439f6908603cd036944f8ec35c0.ctex" +path="res://.godot/imported/Owlet_Monster_Idle_4.png-04eda25a8e4fe3685007296f69c08a7d.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://art/Owlet_Monster_Idle_4.png" -dest_files=["res://.godot/imported/Owlet_Monster_Idle_4.png-e97c7439f6908603cd036944f8ec35c0.ctex"] +source_file="res://art/characters/Owlet_Monster_Idle_4.png" +dest_files=["res://.godot/imported/Owlet_Monster_Idle_4.png-04eda25a8e4fe3685007296f69c08a7d.ctex"] [params] diff --git a/art/Owlet_Monster_Run_6.png b/art/characters/Owlet_Monster_Run_6.png similarity index 100% rename from art/Owlet_Monster_Run_6.png rename to art/characters/Owlet_Monster_Run_6.png diff --git a/art/Owlet_Monster_Run_6.png.import b/art/characters/Owlet_Monster_Run_6.png.import similarity index 69% rename from art/Owlet_Monster_Run_6.png.import rename to art/characters/Owlet_Monster_Run_6.png.import index 24643c9..e9a388e 100644 --- a/art/Owlet_Monster_Run_6.png.import +++ b/art/characters/Owlet_Monster_Run_6.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://cjxkidkeka7yp" -path="res://.godot/imported/Owlet_Monster_Run_6.png-91009248b6c6292786c9507b39f56504.ctex" +path="res://.godot/imported/Owlet_Monster_Run_6.png-599a5a356f5ef0ee6ad4db8002037211.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://art/Owlet_Monster_Run_6.png" -dest_files=["res://.godot/imported/Owlet_Monster_Run_6.png-91009248b6c6292786c9507b39f56504.ctex"] +source_file="res://art/characters/Owlet_Monster_Run_6.png" +dest_files=["res://.godot/imported/Owlet_Monster_Run_6.png-599a5a356f5ef0ee6ad4db8002037211.ctex"] [params] diff --git a/art/Owlet_Monster_Throw_4.png b/art/characters/Owlet_Monster_Throw_4.png similarity index 100% rename from art/Owlet_Monster_Throw_4.png rename to art/characters/Owlet_Monster_Throw_4.png diff --git a/art/Owlet_Monster_Throw_4.png.import b/art/characters/Owlet_Monster_Throw_4.png.import similarity index 68% rename from art/Owlet_Monster_Throw_4.png.import rename to art/characters/Owlet_Monster_Throw_4.png.import index fcbcaac..862a718 100644 --- a/art/Owlet_Monster_Throw_4.png.import +++ b/art/characters/Owlet_Monster_Throw_4.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://dbrr63tv6i2ek" -path="res://.godot/imported/Owlet_Monster_Throw_4.png-b0e6d7a8b3f3e05fa0a65ca1d572b1b3.ctex" +path="res://.godot/imported/Owlet_Monster_Throw_4.png-c44d36056ea6ec1613f179393eb52b0e.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://art/Owlet_Monster_Throw_4.png" -dest_files=["res://.godot/imported/Owlet_Monster_Throw_4.png-b0e6d7a8b3f3e05fa0a65ca1d572b1b3.ctex"] +source_file="res://art/characters/Owlet_Monster_Throw_4.png" +dest_files=["res://.godot/imported/Owlet_Monster_Throw_4.png-c44d36056ea6ec1613f179393eb52b0e.ctex"] [params] diff --git a/art/Owlet_Monster_Walk_6.png b/art/characters/Owlet_Monster_Walk_6.png similarity index 100% rename from art/Owlet_Monster_Walk_6.png rename to art/characters/Owlet_Monster_Walk_6.png diff --git a/art/Owlet_Monster_Walk_6.png.import b/art/characters/Owlet_Monster_Walk_6.png.import similarity index 68% rename from art/Owlet_Monster_Walk_6.png.import rename to art/characters/Owlet_Monster_Walk_6.png.import index c6fd6df..2f5e1ea 100644 --- a/art/Owlet_Monster_Walk_6.png.import +++ b/art/characters/Owlet_Monster_Walk_6.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://bqkvmyqo86dtj" -path="res://.godot/imported/Owlet_Monster_Walk_6.png-f3db40d07a0bf1fd7998c83382ca48f1.ctex" +path="res://.godot/imported/Owlet_Monster_Walk_6.png-c53ef493993b744863f557369685f1f7.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://art/Owlet_Monster_Walk_6.png" -dest_files=["res://.godot/imported/Owlet_Monster_Walk_6.png-f3db40d07a0bf1fd7998c83382ca48f1.ctex"] +source_file="res://art/characters/Owlet_Monster_Walk_6.png" +dest_files=["res://.godot/imported/Owlet_Monster_Walk_6.png-c53ef493993b744863f557369685f1f7.ctex"] [params] diff --git a/art/Pink_Monster_Idle_4.png b/art/characters/Pink_Monster_Idle_4.png similarity index 100% rename from art/Pink_Monster_Idle_4.png rename to art/characters/Pink_Monster_Idle_4.png diff --git a/art/Pink_Monster_Idle_4.png.import b/art/characters/Pink_Monster_Idle_4.png.import similarity index 69% rename from art/Pink_Monster_Idle_4.png.import rename to art/characters/Pink_Monster_Idle_4.png.import index 00f7c8f..653a7f9 100644 --- a/art/Pink_Monster_Idle_4.png.import +++ b/art/characters/Pink_Monster_Idle_4.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://dylr4xf3far68" -path="res://.godot/imported/Pink_Monster_Idle_4.png-dfd4ddf26ff0c47d32f43de16090eb28.ctex" +path="res://.godot/imported/Pink_Monster_Idle_4.png-f48ea7979613eb81d812a754dd3c4b23.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://art/Pink_Monster_Idle_4.png" -dest_files=["res://.godot/imported/Pink_Monster_Idle_4.png-dfd4ddf26ff0c47d32f43de16090eb28.ctex"] +source_file="res://art/characters/Pink_Monster_Idle_4.png" +dest_files=["res://.godot/imported/Pink_Monster_Idle_4.png-f48ea7979613eb81d812a754dd3c4b23.ctex"] [params] diff --git a/art/Pink_Monster_Run_6.png b/art/characters/Pink_Monster_Run_6.png similarity index 100% rename from art/Pink_Monster_Run_6.png rename to art/characters/Pink_Monster_Run_6.png diff --git a/art/Pink_Monster_Run_6.png.import b/art/characters/Pink_Monster_Run_6.png.import similarity index 69% rename from art/Pink_Monster_Run_6.png.import rename to art/characters/Pink_Monster_Run_6.png.import index bfd15b3..cb62b72 100644 --- a/art/Pink_Monster_Run_6.png.import +++ b/art/characters/Pink_Monster_Run_6.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://bql3ivf3dql6f" -path="res://.godot/imported/Pink_Monster_Run_6.png-d337bc3c6832d6b33b34cde0ca44e357.ctex" +path="res://.godot/imported/Pink_Monster_Run_6.png-0a22b55e3303cfb892184b80cff4047d.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://art/Pink_Monster_Run_6.png" -dest_files=["res://.godot/imported/Pink_Monster_Run_6.png-d337bc3c6832d6b33b34cde0ca44e357.ctex"] +source_file="res://art/characters/Pink_Monster_Run_6.png" +dest_files=["res://.godot/imported/Pink_Monster_Run_6.png-0a22b55e3303cfb892184b80cff4047d.ctex"] [params] diff --git a/art/Pink_Monster_Throw_4.png b/art/characters/Pink_Monster_Throw_4.png similarity index 100% rename from art/Pink_Monster_Throw_4.png rename to art/characters/Pink_Monster_Throw_4.png diff --git a/art/Pink_Monster_Throw_4.png.import b/art/characters/Pink_Monster_Throw_4.png.import similarity index 68% rename from art/Pink_Monster_Throw_4.png.import rename to art/characters/Pink_Monster_Throw_4.png.import index 59195a5..1a59251 100644 --- a/art/Pink_Monster_Throw_4.png.import +++ b/art/characters/Pink_Monster_Throw_4.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://bydnrc6ixlv8w" -path="res://.godot/imported/Pink_Monster_Throw_4.png-6379c8d3070f7e87fe37b02ca39c1690.ctex" +path="res://.godot/imported/Pink_Monster_Throw_4.png-960d8bbaa2d3b22e3042229c8d0b2cb1.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://art/Pink_Monster_Throw_4.png" -dest_files=["res://.godot/imported/Pink_Monster_Throw_4.png-6379c8d3070f7e87fe37b02ca39c1690.ctex"] +source_file="res://art/characters/Pink_Monster_Throw_4.png" +dest_files=["res://.godot/imported/Pink_Monster_Throw_4.png-960d8bbaa2d3b22e3042229c8d0b2cb1.ctex"] [params] diff --git a/art/Pink_Monster_Walk_6.png b/art/characters/Pink_Monster_Walk_6.png similarity index 100% rename from art/Pink_Monster_Walk_6.png rename to art/characters/Pink_Monster_Walk_6.png diff --git a/art/Pink_Monster_Walk_6.png.import b/art/characters/Pink_Monster_Walk_6.png.import similarity index 69% rename from art/Pink_Monster_Walk_6.png.import rename to art/characters/Pink_Monster_Walk_6.png.import index 926dcdf..baa9cb6 100644 --- a/art/Pink_Monster_Walk_6.png.import +++ b/art/characters/Pink_Monster_Walk_6.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://bbwsdd0jddmck" -path="res://.godot/imported/Pink_Monster_Walk_6.png-56f137427307346e616efca3c76723df.ctex" +path="res://.godot/imported/Pink_Monster_Walk_6.png-851cbeaf8825b849123372294057e868.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://art/Pink_Monster_Walk_6.png" -dest_files=["res://.godot/imported/Pink_Monster_Walk_6.png-56f137427307346e616efca3c76723df.ctex"] +source_file="res://art/characters/Pink_Monster_Walk_6.png" +dest_files=["res://.godot/imported/Pink_Monster_Walk_6.png-851cbeaf8825b849123372294057e868.ctex"] [params] diff --git a/art/pilko.png b/art/objects/ball.png similarity index 100% rename from art/pilko.png rename to art/objects/ball.png diff --git a/art/pilko.png.import b/art/objects/ball.png.import similarity index 73% rename from art/pilko.png.import rename to art/objects/ball.png.import index 402b5e3..42e6475 100644 --- a/art/pilko.png.import +++ b/art/objects/ball.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://dl8qfp3u18nkx" -path="res://.godot/imported/pilko.png-8aabfc83bdded6cb5f6dd16640cb8b5e.ctex" +path="res://.godot/imported/ball.png-e941be7ff41f8160e57fd7f0d82e1200.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://art/pilko.png" -dest_files=["res://.godot/imported/pilko.png-8aabfc83bdded6cb5f6dd16640cb8b5e.ctex"] +source_file="res://art/objects/ball.png" +dest_files=["res://.godot/imported/ball.png-e941be7ff41f8160e57fd7f0d82e1200.ctex"] [params] diff --git a/art/tiles/destination_tile.png b/art/tiles/destination_tile.png new file mode 100644 index 0000000..2dd64c2 Binary files /dev/null and b/art/tiles/destination_tile.png differ diff --git a/art/tiles/destination_tile.png.import b/art/tiles/destination_tile.png.import new file mode 100644 index 0000000..69e1c3f --- /dev/null +++ b/art/tiles/destination_tile.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b7565sd31qorm" +path="res://.godot/imported/destination_tile.png-6f95af7bf74b60a839485c30677f4a21.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/tiles/destination_tile.png" +dest_files=["res://.godot/imported/destination_tile.png-6f95af7bf74b60a839485c30677f4a21.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 diff --git a/art/tile.png b/art/tiles/ground_tile.png similarity index 100% rename from art/tile.png rename to art/tiles/ground_tile.png diff --git a/art/tile.png.import b/art/tiles/ground_tile.png.import similarity index 71% rename from art/tile.png.import rename to art/tiles/ground_tile.png.import index 65c1e47..e84f7d0 100644 --- a/art/tile.png.import +++ b/art/tiles/ground_tile.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://cm58s70te836m" -path="res://.godot/imported/tile.png-73ea3a56b72978ec382fa65704c5659d.ctex" +path="res://.godot/imported/ground_tile.png-a0838c31e75c33807f6e9b010d97f31b.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://art/tile.png" -dest_files=["res://.godot/imported/tile.png-73ea3a56b72978ec382fa65704c5659d.ctex"] +source_file="res://art/tiles/ground_tile.png" +dest_files=["res://.godot/imported/ground_tile.png-a0838c31e75c33807f6e9b010d97f31b.ctex"] [params] diff --git a/art/tiles/target_tile.png b/art/tiles/target_tile.png new file mode 100644 index 0000000..52abc59 Binary files /dev/null and b/art/tiles/target_tile.png differ diff --git a/art/tiles/target_tile.png.import b/art/tiles/target_tile.png.import new file mode 100644 index 0000000..451c621 --- /dev/null +++ b/art/tiles/target_tile.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d265li1k63anm" +path="res://.godot/imported/target_tile.png-8889c881dce8d973f9cccb76e30928fa.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/tiles/target_tile.png" +dest_files=["res://.godot/imported/target_tile.png-8889c881dce8d973f9cccb76e30928fa.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 diff --git a/art/wall.png b/art/tiles/wall_tile.png similarity index 100% rename from art/wall.png rename to art/tiles/wall_tile.png diff --git a/art/wall.png.import b/art/tiles/wall_tile.png.import similarity index 72% rename from art/wall.png.import rename to art/tiles/wall_tile.png.import index 4519f2c..0dddfb7 100644 --- a/art/wall.png.import +++ b/art/tiles/wall_tile.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://lnt0clkwms52" -path="res://.godot/imported/wall.png-a390048f5e12dd0b271d636d681186c9.ctex" +path="res://.godot/imported/wall_tile.png-943542e63eb98fa5c2f8ba381f7ef7b8.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://art/wall.png" -dest_files=["res://.godot/imported/wall.png-a390048f5e12dd0b271d636d681186c9.ctex"] +source_file="res://art/tiles/wall_tile.png" +dest_files=["res://.godot/imported/wall_tile.png-943542e63eb98fa5c2f8ba381f7ef7b8.ctex"] [params] diff --git a/scenes/ball.tscn b/scenes/ball.tscn index 4358fc0..421142c 100644 --- a/scenes/ball.tscn +++ b/scenes/ball.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=3 uid="uid://cy0ko2cawudia"] -[ext_resource type="Texture2D" uid="uid://dl8qfp3u18nkx" path="res://art/pilko.png" id="1_20u67"] +[ext_resource type="Texture2D" uid="uid://dl8qfp3u18nkx" path="res://art/objects/ball.png" id="1_un30v"] [sub_resource type="CircleShape2D" id="CircleShape2D_srlvs"] radius = 5.0 @@ -9,7 +9,7 @@ radius = 5.0 z_index = 1 [node name="Sprite2D" type="Sprite2D" parent="."] -texture = ExtResource("1_20u67") +texture = ExtResource("1_un30v") [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource("CircleShape2D_srlvs") diff --git a/scenes/enemy.tscn b/scenes/enemy.tscn index 84c3347..dbb2760 100644 --- a/scenes/enemy.tscn +++ b/scenes/enemy.tscn @@ -1,10 +1,10 @@ [gd_scene load_steps=12 format=3 uid="uid://bktg1ypaav3q3"] -[ext_resource type="Texture2D" uid="uid://bbwsdd0jddmck" path="res://art/Pink_Monster_Walk_6.png" id="1_e5603"] -[ext_resource type="Script" path="res://scripts/enemy.gd" id="1_l5lyv"] -[ext_resource type="Texture2D" uid="uid://dylr4xf3far68" path="res://art/Pink_Monster_Idle_4.png" id="2_duxxr"] -[ext_resource type="Texture2D" uid="uid://bydnrc6ixlv8w" path="res://art/Pink_Monster_Throw_4.png" id="2_iscwr"] +[ext_resource type="Script" path="res://scripts/enemy/enemy.gd" id="1_2uhn6"] +[ext_resource type="Texture2D" uid="uid://bydnrc6ixlv8w" path="res://art/characters/Pink_Monster_Throw_4.png" id="2_5t5q0"] +[ext_resource type="Texture2D" uid="uid://dylr4xf3far68" path="res://art/characters/Pink_Monster_Idle_4.png" id="3_5xsrd"] [ext_resource type="PackedScene" uid="uid://b51tdt5kunai" path="res://scenes/enemy_behavior_tree.tscn" id="3_jk76t"] +[ext_resource type="Texture2D" uid="uid://bbwsdd0jddmck" path="res://art/characters/Pink_Monster_Walk_6.png" id="4_qk3ak"] [sub_resource type="Animation" id="Animation_ouyrp"] length = 0.001 @@ -23,7 +23,47 @@ tracks/0/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, -"values": [ExtResource("2_duxxr")] +"values": [ExtResource("3_5xsrd")] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("Sprite2D:hframes") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [4] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("Sprite2D:frame") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0, 0.1, 0.2, 0.3), +"transitions": PackedFloat32Array(1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 3] +} + +[sub_resource type="Animation" id="Animation_jt5bg"] +resource_name = "throw" +length = 0.4 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:texture") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [ExtResource("2_5t5q0")] } tracks/1/type = "value" tracks/1/imported = false @@ -64,7 +104,7 @@ tracks/0/keys = { "times": PackedFloat32Array(0), "transitions": PackedFloat32Array(1), "update": 1, -"values": [ExtResource("1_e5603")] +"values": [ExtResource("4_qk3ak")] } tracks/1/type = "value" tracks/1/imported = false @@ -91,46 +131,6 @@ tracks/2/keys = { "values": [0, 1, 2, 3, 4, 5] } -[sub_resource type="Animation" id="Animation_jt5bg"] -resource_name = "throw" -length = 0.4 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("Sprite2D:texture") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [ExtResource("2_iscwr")] -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("Sprite2D:hframes") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [4] -} -tracks/2/type = "value" -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/path = NodePath("Sprite2D:frame") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/keys = { -"times": PackedFloat32Array(0, 0.1, 0.2, 0.3), -"transitions": PackedFloat32Array(1, 1, 1, 1), -"update": 1, -"values": [0, 1, 2, 3] -} - [sub_resource type="AnimationLibrary" id="AnimationLibrary_gnukq"] _data = { "RESET": SubResource("Animation_ouyrp"), @@ -143,11 +143,11 @@ _data = { size = Vector2(17, 10) [node name="Enemy" type="CharacterBody2D"] -script = ExtResource("1_l5lyv") +script = ExtResource("1_2uhn6") [node name="Sprite2D" type="Sprite2D" parent="."] position = Vector2(0, -16) -texture = ExtResource("2_iscwr") +texture = ExtResource("2_5t5q0") flip_h = true hframes = 4 diff --git a/scenes/enemy_behavior_tree.tscn b/scenes/enemy_behavior_tree.tscn index 3515f30..d7abf79 100644 --- a/scenes/enemy_behavior_tree.tscn +++ b/scenes/enemy_behavior_tree.tscn @@ -3,14 +3,14 @@ [ext_resource type="Script" path="res://addons/beehave/nodes/beehave_tree.gd" id="1_b2pc4"] [ext_resource type="Script" path="res://addons/beehave/nodes/composites/sequence.gd" id="2_80fm4"] [ext_resource type="Script" path="res://addons/beehave/nodes/composites/selector.gd" id="2_xkd41"] -[ext_resource type="Script" path="res://scripts/is_idle_condition.gd" id="3_5jur1"] -[ext_resource type="Script" path="res://scripts/move_to_target_action.gd" id="4_1on4v"] -[ext_resource type="Script" path="res://scripts/can_wait_condition.gd" id="4_x5ium"] +[ext_resource type="Script" path="res://scripts/enemy/behavior_tree/can_wait_condition.gd" id="4_0jr1a"] [ext_resource type="Script" path="res://addons/beehave/nodes/decorators/time_limiter.gd" id="5_012bh"] -[ext_resource type="Script" path="res://scripts/wait_action.gd" id="5_xel2n"] -[ext_resource type="Script" path="res://scripts/can_throw_ball_condition.gd" id="7_qj5mg"] -[ext_resource type="Script" path="res://scripts/get_random_top_cell_action.gd" id="7_uo3i6"] -[ext_resource type="Script" path="res://scripts/throw_ball_action.gd" id="8_sunpr"] +[ext_resource type="Script" path="res://scripts/enemy/behavior_tree/wait_action.gd" id="6_eyknc"] +[ext_resource type="Script" path="res://scripts/enemy/behavior_tree/can_throw_ball_condition.gd" id="7_k5qlq"] +[ext_resource type="Script" path="res://scripts/enemy/behavior_tree/throw_ball_action.gd" id="8_wytqf"] +[ext_resource type="Script" path="res://scripts/enemy/behavior_tree/is_idle_condition.gd" id="9_vboat"] +[ext_resource type="Script" path="res://scripts/enemy/behavior_tree/get_random_destination_action.gd" id="10_f4jrw"] +[ext_resource type="Script" path="res://scripts/enemy/behavior_tree/move_to_destination_action.gd" id="11_tjc85"] [node name="EnemyBehaviorTree" type="Node"] script = ExtResource("1_b2pc4") @@ -22,32 +22,32 @@ script = ExtResource("2_xkd41") script = ExtResource("2_80fm4") [node name="CanWait" type="Node" parent="MainSelector/WaitSequence"] -script = ExtResource("4_x5ium") +script = ExtResource("4_0jr1a") [node name="TimeLimiterDecorator" type="Node" parent="MainSelector/WaitSequence"] script = ExtResource("5_012bh") wait_time = 2.0 [node name="Wait" type="Node" parent="MainSelector/WaitSequence/TimeLimiterDecorator"] -script = ExtResource("5_xel2n") +script = ExtResource("6_eyknc") [node name="ThrowBallSequence" type="Node" parent="MainSelector"] script = ExtResource("2_80fm4") [node name="CanThrowBall" type="Node" parent="MainSelector/ThrowBallSequence"] -script = ExtResource("7_qj5mg") +script = ExtResource("7_k5qlq") [node name="ThrowBall" type="Node" parent="MainSelector/ThrowBallSequence"] -script = ExtResource("8_sunpr") +script = ExtResource("8_wytqf") [node name="ReturnBallSequence" type="Node" parent="MainSelector"] script = ExtResource("2_80fm4") [node name="IsIdle" type="Node" parent="MainSelector/ReturnBallSequence"] -script = ExtResource("3_5jur1") +script = ExtResource("9_vboat") -[node name="GetRandomTopCell" type="Node" parent="MainSelector/ReturnBallSequence"] -script = ExtResource("7_uo3i6") +[node name="GetRandomDestination" type="Node" parent="MainSelector/ReturnBallSequence"] +script = ExtResource("10_f4jrw") -[node name="MoveToTarget" type="Node" parent="MainSelector/ReturnBallSequence"] -script = ExtResource("4_1on4v") +[node name="MoveToDestination" type="Node" parent="MainSelector/ReturnBallSequence"] +script = ExtResource("11_tjc85") diff --git a/scenes/player.tscn b/scenes/player.tscn index 8b6b2b1..8297e0d 100644 --- a/scenes/player.tscn +++ b/scenes/player.tscn @@ -1,13 +1,13 @@ [gd_scene load_steps=16 format=3 uid="uid://ba1t35yyot4jl"] -[ext_resource type="Texture2D" uid="uid://bqkvmyqo86dtj" path="res://art/Owlet_Monster_Walk_6.png" id="1_e23l4"] -[ext_resource type="Script" path="res://scripts/player.gd" id="1_fmx2p"] -[ext_resource type="Texture2D" uid="uid://cjxkidkeka7yp" path="res://art/Owlet_Monster_Run_6.png" id="2_qq5i7"] -[ext_resource type="Texture2D" uid="uid://bi7ceeuwhg5mp" path="res://art/Owlet_Monster_Idle_4.png" id="4_orj3a"] -[ext_resource type="Texture2D" uid="uid://dbrr63tv6i2ek" path="res://art/Owlet_Monster_Throw_4.png" id="5_2s1mg"] -[ext_resource type="Script" path="res://scripts/state_machine.gd" id="6_hl63m"] -[ext_resource type="Script" path="res://scripts/player_idle_state.gd" id="7_0nfrc"] -[ext_resource type="Script" path="res://scripts/player_walk_state.gd" id="7_gcd3q"] +[ext_resource type="Texture2D" uid="uid://bqkvmyqo86dtj" path="res://art/characters/Owlet_Monster_Walk_6.png" id="1_e23l4"] +[ext_resource type="Script" path="res://scripts/player/player.gd" id="1_fmx2p"] +[ext_resource type="Texture2D" uid="uid://cjxkidkeka7yp" path="res://art/characters/Owlet_Monster_Run_6.png" id="2_qq5i7"] +[ext_resource type="Texture2D" uid="uid://bi7ceeuwhg5mp" path="res://art/characters/Owlet_Monster_Idle_4.png" id="4_orj3a"] +[ext_resource type="Texture2D" uid="uid://dbrr63tv6i2ek" path="res://art/characters/Owlet_Monster_Throw_4.png" id="5_2s1mg"] +[ext_resource type="Script" path="res://scripts/state_machine/state_machine.gd" id="6_hl63m"] +[ext_resource type="Script" path="res://scripts/player/states/player_idle_state.gd" id="7_0nfrc"] +[ext_resource type="Script" path="res://scripts/player/states/player_walk_state.gd" id="7_gcd3q"] [sub_resource type="Animation" id="Animation_rh7n7"] length = 0.001 diff --git a/scenes/tile_map.tscn b/scenes/tile_map.tscn index 4ed9434..0a999ec 100644 --- a/scenes/tile_map.tscn +++ b/scenes/tile_map.tscn @@ -1,24 +1,40 @@ -[gd_scene load_steps=7 format=3 uid="uid://m8uyi35gr3qd"] +[gd_scene load_steps=11 format=3 uid="uid://m8uyi35gr3qd"] -[ext_resource type="Texture2D" uid="uid://cm58s70te836m" path="res://art/tile.png" id="1_2goti"] -[ext_resource type="Texture2D" uid="uid://lnt0clkwms52" path="res://art/wall.png" id="2_xllgf"] -[ext_resource type="Script" path="res://scripts/tile_map.gd" id="3_067ya"] +[ext_resource type="Texture2D" uid="uid://cm58s70te836m" path="res://art/tiles/ground_tile.png" id="1_set62"] +[ext_resource type="Texture2D" uid="uid://lnt0clkwms52" path="res://art/tiles/wall_tile.png" id="2_iitec"] +[ext_resource type="Texture2D" uid="uid://b7565sd31qorm" path="res://art/tiles/destination_tile.png" id="3_ca0hc"] +[ext_resource type="Texture2D" uid="uid://d265li1k63anm" path="res://art/tiles/target_tile.png" id="4_w73lj"] +[ext_resource type="Script" path="res://scripts/tile_map/tile_map.gd" id="5_hxvn0"] [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_wq1n0"] -texture = ExtResource("1_2goti") +texture = ExtResource("1_set62") texture_region_size = Vector2i(32, 32) 0:0/0 = 0 0:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) 0:0/0/physics_layer_0/angular_velocity = 0.0 [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_u0t08"] -texture = ExtResource("2_xllgf") +texture = ExtResource("2_iitec") texture_region_size = Vector2i(32, 32) 0:0/0 = 0 0:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) 0:0/0/physics_layer_0/angular_velocity = 0.0 0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 8.5, 0, 1.5, 15.5, 9, 0, 16) +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_x1mdb"] +texture = ExtResource("3_ca0hc") +texture_region_size = Vector2i(32, 32) +0:0/0 = 0 +0:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:0/0/physics_layer_0/angular_velocity = 0.0 + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_hm0kl"] +texture = ExtResource("4_w73lj") +texture_region_size = Vector2i(32, 32) +0:0/0 = 0 +0:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) +0:0/0/physics_layer_0/angular_velocity = 0.0 + [sub_resource type="TileSet" id="TileSet_kwgeq"] tile_shape = 1 tile_layout = 5 @@ -26,6 +42,8 @@ tile_size = Vector2i(32, 16) physics_layer_0/collision_layer = 1 sources/0 = SubResource("TileSetAtlasSource_wq1n0") sources/1 = SubResource("TileSetAtlasSource_u0t08") +sources/2 = SubResource("TileSetAtlasSource_x1mdb") +sources/3 = SubResource("TileSetAtlasSource_hm0kl") [node name="TileMap" type="TileMap"] y_sort_enabled = true @@ -40,4 +58,4 @@ layer_1/y_sort_enabled = true layer_1/y_sort_origin = 0 layer_1/z_index = 1 layer_1/tile_data = PackedInt32Array() -script = ExtResource("3_067ya") +script = ExtResource("5_hxvn0") diff --git a/scripts/can_throw_ball_condition.gd b/scripts/enemy/behavior_tree/can_throw_ball_condition.gd similarity index 100% rename from scripts/can_throw_ball_condition.gd rename to scripts/enemy/behavior_tree/can_throw_ball_condition.gd diff --git a/scripts/can_wait_condition.gd b/scripts/enemy/behavior_tree/can_wait_condition.gd similarity index 100% rename from scripts/can_wait_condition.gd rename to scripts/enemy/behavior_tree/can_wait_condition.gd diff --git a/scripts/get_random_top_cell_action.gd b/scripts/enemy/behavior_tree/get_random_destination_action.gd similarity index 82% rename from scripts/get_random_top_cell_action.gd rename to scripts/enemy/behavior_tree/get_random_destination_action.gd index f247d65..7d10b45 100644 --- a/scripts/get_random_top_cell_action.gd +++ b/scripts/enemy/behavior_tree/get_random_destination_action.gd @@ -1,9 +1,9 @@ -class_name GetRandomTopCellAction +class_name GetRandomDestinationAction extends ActionLeaf func tick(actor: Node, blackboard: Blackboard): var rand_cell: Vector2i = actor.tile_map.get_random_top_cell() - actor.tile_map.set_cell(0, Vector2i(rand_cell.x, rand_cell.y), 1, Vector2i(0, 0), 0) # debug purpose + actor.tile_map.set_cell(0, Vector2i(rand_cell.x, rand_cell.y), 2, Vector2i(0, 0), 0) # debug purpose var destination = actor.tile_map.map_to_local(rand_cell) destination.y += actor.Y_SPAWN_OFFSET diff --git a/scripts/is_idle_condition.gd b/scripts/enemy/behavior_tree/is_idle_condition.gd similarity index 100% rename from scripts/is_idle_condition.gd rename to scripts/enemy/behavior_tree/is_idle_condition.gd diff --git a/scripts/move_to_target_action.gd b/scripts/enemy/behavior_tree/move_to_destination_action.gd similarity index 93% rename from scripts/move_to_target_action.gd rename to scripts/enemy/behavior_tree/move_to_destination_action.gd index 71b412b..48d9c69 100644 --- a/scripts/move_to_target_action.gd +++ b/scripts/enemy/behavior_tree/move_to_destination_action.gd @@ -1,4 +1,4 @@ -class_name MoveToTargetAction +class_name MoveToDestinationAction extends ActionLeaf func before_run(actor, blackboard): diff --git a/scripts/throw_ball_action.gd b/scripts/enemy/behavior_tree/throw_ball_action.gd similarity index 100% rename from scripts/throw_ball_action.gd rename to scripts/enemy/behavior_tree/throw_ball_action.gd diff --git a/scripts/wait_action.gd b/scripts/enemy/behavior_tree/wait_action.gd similarity index 100% rename from scripts/wait_action.gd rename to scripts/enemy/behavior_tree/wait_action.gd diff --git a/scripts/enemy.gd b/scripts/enemy/enemy.gd similarity index 100% rename from scripts/enemy.gd rename to scripts/enemy/enemy.gd diff --git a/scripts/player.gd b/scripts/player/player.gd similarity index 100% rename from scripts/player.gd rename to scripts/player/player.gd diff --git a/scripts/player_idle_state.gd b/scripts/player/states/player_idle_state.gd similarity index 100% rename from scripts/player_idle_state.gd rename to scripts/player/states/player_idle_state.gd diff --git a/scripts/player_state.gd b/scripts/player/states/player_state.gd similarity index 100% rename from scripts/player_state.gd rename to scripts/player/states/player_state.gd diff --git a/scripts/player_walk_state.gd b/scripts/player/states/player_walk_state.gd similarity index 100% rename from scripts/player_walk_state.gd rename to scripts/player/states/player_walk_state.gd diff --git a/scripts/state.gd b/scripts/state_machine/state.gd similarity index 100% rename from scripts/state.gd rename to scripts/state_machine/state.gd diff --git a/scripts/state_machine.gd b/scripts/state_machine/state_machine.gd similarity index 100% rename from scripts/state_machine.gd rename to scripts/state_machine/state_machine.gd diff --git a/scripts/tile_map.gd b/scripts/tile_map/tile_map.gd similarity index 100% rename from scripts/tile_map.gd rename to scripts/tile_map/tile_map.gd