save
|
After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cpyntpwy5riy8"
|
||||
path="res://.godot/imported/stone_walk-Sheet.png-b37d03ae35e4fa21cd0b8f9fd3701b26.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/Sprites/Characters/Enemies/stone_walk-Sheet.png"
|
||||
dest_files=["res://.godot/imported/stone_walk-Sheet.png-b37d03ae35e4fa21cd0b8f9fd3701b26.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
|
||||
|
After Width: | Height: | Size: 2.9 KiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://blkxqlgahm4al"
|
||||
path="res://.godot/imported/stump-Sheet.png-b806e33459c8ff66f9ee9ffc6bbbbf56.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/Sprites/Characters/Enemies/stump-Sheet.png"
|
||||
dest_files=["res://.godot/imported/stump-Sheet.png-b806e33459c8ff66f9ee9ffc6bbbbf56.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
|
||||
|
After Width: | Height: | Size: 3.2 KiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://1kkgb0j1bnm7"
|
||||
path="res://.godot/imported/stump_attack-Sheet.png-960eb7e1324b8df9df9cb38a637f24d4.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/Sprites/Characters/Enemies/stump_attack-Sheet.png"
|
||||
dest_files=["res://.godot/imported/stump_attack-Sheet.png-960eb7e1324b8df9df9cb38a637f24d4.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
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dab3cq4y0d2pm"
|
||||
path="res://.godot/imported/water-Sheet.png-91c518e053a88010c4c4cf2bec7d93c8.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/Sprites/Characters/Enemies/water-Sheet.png"
|
||||
dest_files=["res://.godot/imported/water-Sheet.png-91c518e053a88010c4c4cf2bec7d93c8.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
|
||||
|
After Width: | Height: | Size: 976 B |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c6dl0tlkdtis1"
|
||||
path="res://.godot/imported/oniSheet.png-b8378366bf6353d355389916f84c4a21.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/Sprites/Characters/Player/oniSheet.png"
|
||||
dest_files=["res://.godot/imported/oniSheet.png-b8378366bf6353d355389916f84c4a21.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
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://codbtra5i6ara"
|
||||
path="res://.godot/imported/tengu-Sheet.png-bd1922231358608f458a7e383bdb6938.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/Sprites/Characters/Player/tengu-Sheet.png"
|
||||
dest_files=["res://.godot/imported/tengu-Sheet.png-bd1922231358608f458a7e383bdb6938.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
|
||||
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bnq8qxou2sgvw"
|
||||
path="res://.godot/imported/sakura.png-b12ae8679555da89906a9bb60ba56118.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/Sprites/Environments/sakura.png"
|
||||
dest_files=["res://.godot/imported/sakura.png-b12ae8679555da89906a9bb60ba56118.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
|
||||
|
After Width: | Height: | Size: 737 B |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dxon2g2sn48jq"
|
||||
path="res://.godot/imported/blueflame.png-9ecbfb949461f9cb1fab611fc06999c6.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/Sprites/Projectiles/blueflame.png"
|
||||
dest_files=["res://.godot/imported/blueflame.png-9ecbfb949461f9cb1fab611fc06999c6.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
|
||||
|
After Width: | Height: | Size: 897 B |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://m77l7ej5ojn0"
|
||||
path="res://.godot/imported/flame_attack.png-5976c405e743e9ca07cffcd6eb29b216.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/Sprites/Projectiles/flame_attack.png"
|
||||
dest_files=["res://.godot/imported/flame_attack.png-5976c405e743e9ca07cffcd6eb29b216.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
|
||||
@@ -0,0 +1,75 @@
|
||||
[gd_scene load_steps=11 format=3 uid="uid://c37hbbbx8wje"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bj52mq7uip7di" path="res://Scripts/Enemies/Enemy.cs" id="1_rmkli"]
|
||||
[ext_resource type="Texture2D" uid="uid://dab3cq4y0d2pm" path="res://Assets/Sprites/Characters/Enemies/water-Sheet.png" id="2_rmkli"]
|
||||
[ext_resource type="Script" uid="uid://cu37tswrk107q" path="res://Scripts/Enemies/EnemyMovement.cs" id="3_t8by4"]
|
||||
[ext_resource type="Script" uid="uid://dvkd1keu854so" path="res://Scripts/Components/Health.cs" id="4_cyy2q"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_frtie"]
|
||||
atlas = ExtResource("2_rmkli")
|
||||
region = Rect2(0, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_t8by4"]
|
||||
atlas = ExtResource("2_rmkli")
|
||||
region = Rect2(32, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_cyy2q"]
|
||||
atlas = ExtResource("2_rmkli")
|
||||
region = Rect2(64, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_1jpca"]
|
||||
atlas = ExtResource("2_rmkli")
|
||||
region = Rect2(96, 0, 32, 32)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_ewbju"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_frtie")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_t8by4")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_cyy2q")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_1jpca")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_7puah"]
|
||||
radius = 12.0
|
||||
|
||||
[node name="enemy" type="PathFollow2D" node_paths=PackedStringArray("Health")]
|
||||
rotates = false
|
||||
loop = false
|
||||
script = ExtResource("1_rmkli")
|
||||
Health = NodePath("Scripts/Health")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
sprite_frames = SubResource("SpriteFrames_ewbju")
|
||||
offset = Vector2(0, -16)
|
||||
|
||||
[node name="Scripts" type="Node" parent="."]
|
||||
|
||||
[node name="Movement" type="Node" parent="Scripts" node_paths=PackedStringArray("_pathFollow2D")]
|
||||
script = ExtResource("3_t8by4")
|
||||
_pathFollow2D = NodePath("../..")
|
||||
_speed = 25.0
|
||||
|
||||
[node name="Health" type="Node" parent="Scripts"]
|
||||
script = ExtResource("4_cyy2q")
|
||||
_baseMaxHp = 50.0
|
||||
|
||||
[node name="HitBox" type="Area2D" parent="."]
|
||||
collision_layer = 4
|
||||
collision_mask = 0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="HitBox"]
|
||||
position = Vector2(-1, -9)
|
||||
shape = SubResource("CircleShape2D_7puah")
|
||||
@@ -1,34 +1,37 @@
|
||||
[gd_scene load_steps=12 format=3 uid="uid://y54cvugsx75b"]
|
||||
[gd_scene load_steps=15 format=3 uid="uid://y54cvugsx75b"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cm8gnfvfysyyl" path="res://Assets/Sprites/Characters/Enemies/stone-Sheet.png" id="1_7puah"]
|
||||
[ext_resource type="Script" uid="uid://cu37tswrk107q" path="res://Scripts/Enemies/EnemyMovement.cs" id="2_wtb2n"]
|
||||
[ext_resource type="Script" uid="uid://bj52mq7uip7di" path="res://Scripts/Enemies/Enemy.cs" id="1_qqq3s"]
|
||||
[ext_resource type="Texture2D" uid="uid://cm8gnfvfysyyl" path="res://Assets/Sprites/Characters/Enemies/stone-Sheet.png" id="2_ymaxx"]
|
||||
[ext_resource type="Script" uid="uid://cu37tswrk107q" path="res://Scripts/Enemies/EnemyMovement.cs" id="3_pbvk1"]
|
||||
[ext_resource type="Script" uid="uid://dvkd1keu854so" path="res://Scripts/Components/Health.cs" id="4_njiku"]
|
||||
[ext_resource type="Script" uid="uid://c247m8m3qmlk0" path="res://Scripts/Enemies/EnemyArea.cs" id="5_ymaxx"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ldgsr"]
|
||||
atlas = ExtResource("1_7puah")
|
||||
atlas = ExtResource("2_ymaxx")
|
||||
region = Rect2(0, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_o5yvi"]
|
||||
atlas = ExtResource("1_7puah")
|
||||
atlas = ExtResource("2_ymaxx")
|
||||
region = Rect2(32, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_rku1e"]
|
||||
atlas = ExtResource("1_7puah")
|
||||
atlas = ExtResource("2_ymaxx")
|
||||
region = Rect2(64, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_rfjv2"]
|
||||
atlas = ExtResource("1_7puah")
|
||||
atlas = ExtResource("2_ymaxx")
|
||||
region = Rect2(96, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_1phco"]
|
||||
atlas = ExtResource("1_7puah")
|
||||
atlas = ExtResource("2_ymaxx")
|
||||
region = Rect2(128, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_nb51f"]
|
||||
atlas = ExtResource("1_7puah")
|
||||
atlas = ExtResource("2_ymaxx")
|
||||
region = Rect2(160, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_nnt18"]
|
||||
atlas = ExtResource("1_7puah")
|
||||
atlas = ExtResource("2_ymaxx")
|
||||
region = Rect2(192, 0, 32, 32)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_ewbju"]
|
||||
@@ -60,30 +63,38 @@ animations = [{
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_i6g32"]
|
||||
radius = 7.0
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_7puah"]
|
||||
radius = 12.0
|
||||
|
||||
[node name="RockBoi" type="CharacterBody2D"]
|
||||
motion_mode = 1
|
||||
|
||||
[node name="NavigationAgent2D" type="NavigationAgent2D" parent="."]
|
||||
path_desired_distance = 1.0
|
||||
simplify_path = true
|
||||
simplify_epsilon = 0.25
|
||||
[node name="enemy" type="PathFollow2D" node_paths=PackedStringArray("Health")]
|
||||
rotates = false
|
||||
loop = false
|
||||
script = ExtResource("1_qqq3s")
|
||||
Health = NodePath("Scripts/Health")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
self_modulate = Color(1.8247963, 1.8247963, 1.8247963, 1)
|
||||
texture_filter = 1
|
||||
sprite_frames = SubResource("SpriteFrames_ewbju")
|
||||
offset = Vector2(0, -16)
|
||||
|
||||
[node name="Scripts" type="Node" parent="."]
|
||||
|
||||
[node name="Movement" type="Node" parent="Scripts" node_paths=PackedStringArray("_agent2D", "_body2D")]
|
||||
script = ExtResource("2_wtb2n")
|
||||
_agent2D = NodePath("../../NavigationAgent2D")
|
||||
_body2D = NodePath("../..")
|
||||
_speed = 44.59
|
||||
[node name="Movement" type="Node" parent="Scripts" node_paths=PackedStringArray("_pathFollow2D")]
|
||||
script = ExtResource("3_pbvk1")
|
||||
_pathFollow2D = NodePath("../..")
|
||||
_speed = 25.0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(0, -7)
|
||||
shape = SubResource("CircleShape2D_i6g32")
|
||||
[node name="Health" type="Node" parent="Scripts"]
|
||||
script = ExtResource("4_njiku")
|
||||
_baseMaxHp = 50.0
|
||||
|
||||
[node name="HitBox" type="Area2D" parent="." node_paths=PackedStringArray("Enemy")]
|
||||
collision_layer = 4
|
||||
collision_mask = 0
|
||||
script = ExtResource("5_ymaxx")
|
||||
Enemy = NodePath("..")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="HitBox"]
|
||||
position = Vector2(0, -14)
|
||||
shape = SubResource("CircleShape2D_7puah")
|
||||
@@ -0,0 +1,106 @@
|
||||
[gd_scene load_steps=15 format=3 uid="uid://bawoevqlooah0"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bj52mq7uip7di" path="res://Scripts/Enemies/Enemy.cs" id="1_0paat"]
|
||||
[ext_resource type="Texture2D" uid="uid://blkxqlgahm4al" path="res://Assets/Sprites/Characters/Enemies/stump-Sheet.png" id="2_0paat"]
|
||||
[ext_resource type="Script" uid="uid://cu37tswrk107q" path="res://Scripts/Enemies/EnemyMovement.cs" id="3_8v58s"]
|
||||
[ext_resource type="Script" uid="uid://dvkd1keu854so" path="res://Scripts/Components/Health.cs" id="4_04dlg"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_pitds"]
|
||||
atlas = ExtResource("2_0paat")
|
||||
region = Rect2(0, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_8v58s"]
|
||||
atlas = ExtResource("2_0paat")
|
||||
region = Rect2(64, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_04dlg"]
|
||||
atlas = ExtResource("2_0paat")
|
||||
region = Rect2(128, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_m1mv1"]
|
||||
atlas = ExtResource("2_0paat")
|
||||
region = Rect2(192, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_6jaqh"]
|
||||
atlas = ExtResource("2_0paat")
|
||||
region = Rect2(256, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_pgfmy"]
|
||||
atlas = ExtResource("2_0paat")
|
||||
region = Rect2(320, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_mu3a6"]
|
||||
atlas = ExtResource("2_0paat")
|
||||
region = Rect2(384, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_byqr4"]
|
||||
atlas = ExtResource("2_0paat")
|
||||
region = Rect2(448, 0, 64, 64)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_ewbju"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_pitds")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_8v58s")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_04dlg")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_m1mv1")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_6jaqh")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_pgfmy")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_mu3a6")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_byqr4")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 8.0
|
||||
}]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_7puah"]
|
||||
radius = 12.0
|
||||
|
||||
[node name="enemy" type="PathFollow2D" node_paths=PackedStringArray("Health")]
|
||||
rotates = false
|
||||
loop = false
|
||||
script = ExtResource("1_0paat")
|
||||
Type = 1
|
||||
Health = NodePath("Scripts/Health")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
sprite_frames = SubResource("SpriteFrames_ewbju")
|
||||
frame = 1
|
||||
frame_progress = 0.31093782
|
||||
offset = Vector2(0, -16)
|
||||
|
||||
[node name="Scripts" type="Node" parent="."]
|
||||
|
||||
[node name="Movement" type="Node" parent="Scripts" node_paths=PackedStringArray("_pathFollow2D")]
|
||||
script = ExtResource("3_8v58s")
|
||||
_pathFollow2D = NodePath("../..")
|
||||
_speed = 25.0
|
||||
|
||||
[node name="Health" type="Node" parent="Scripts"]
|
||||
script = ExtResource("4_04dlg")
|
||||
_baseMaxHp = 50.0
|
||||
|
||||
[node name="HitBox" type="Area2D" parent="."]
|
||||
collision_layer = 4
|
||||
collision_mask = 0
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="HitBox"]
|
||||
position = Vector2(0, -14)
|
||||
shape = SubResource("CircleShape2D_7puah")
|
||||
@@ -0,0 +1,64 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://cr6shokga0dy6"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ln2lt16fi47q" path="res://Scripts/Projectiles/Projectile.cs" id="1_llqe1"]
|
||||
[ext_resource type="Texture2D" uid="uid://m77l7ej5ojn0" path="res://Assets/Sprites/Projectiles/flame_attack.png" id="2_xuxqo"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_llqe1"]
|
||||
radius = 8.062258
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_r2qu7"]
|
||||
atlas = ExtResource("2_xuxqo")
|
||||
region = Rect2(0, 0, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_fgux0"]
|
||||
atlas = ExtResource("2_xuxqo")
|
||||
region = Rect2(16, 0, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_fb7vg"]
|
||||
atlas = ExtResource("2_xuxqo")
|
||||
region = Rect2(32, 0, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_y5q4i"]
|
||||
atlas = ExtResource("2_xuxqo")
|
||||
region = Rect2(48, 0, 16, 32)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_0qapt"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_r2qu7")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_fgux0")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_fb7vg")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_y5q4i")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[node name="Fireball" type="Node2D" node_paths=PackedStringArray("_hurtBox")]
|
||||
texture_filter = 1
|
||||
script = ExtResource("1_llqe1")
|
||||
_superEffective = Array[int]([1])
|
||||
_baseDamage = 25.0
|
||||
_speed = 250.0
|
||||
_hurtBox = NodePath("Hurtbox")
|
||||
|
||||
[node name="Hurtbox" type="Area2D" parent="."]
|
||||
collision_layer = 0
|
||||
collision_mask = 4
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hurtbox"]
|
||||
shape = SubResource("CircleShape2D_llqe1")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
self_modulate = Color(1.8247963, 1.8247963, 1.8247963, 1)
|
||||
rotation = -1.5707964
|
||||
sprite_frames = SubResource("SpriteFrames_0qapt")
|
||||
offset = Vector2(0, -8)
|
||||
@@ -0,0 +1,110 @@
|
||||
[gd_scene load_steps=15 format=3 uid="uid://cx7gr555b1gov"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://be7hl01iuo5af" path="res://Assets/Sprites/Characters/Player/kitsune-Sheet.png" id="1_0bpay"]
|
||||
[ext_resource type="Script" uid="uid://cxrhl65cjw4yr" path="res://Scripts/Turrets/Turret.cs" id="2_jjtgc"]
|
||||
[ext_resource type="Script" uid="uid://cy00plvsi6vkn" path="res://Scripts/Projectiles/ProjectilePool.cs" id="3_d0rgn"]
|
||||
[ext_resource type="PackedScene" uid="uid://cr6shokga0dy6" path="res://Prefabs/Projectiles/Fireball.tscn" id="4_jjtgc"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3dryh"]
|
||||
atlas = ExtResource("1_0bpay")
|
||||
region = Rect2(0, 0, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wowpa"]
|
||||
atlas = ExtResource("1_0bpay")
|
||||
region = Rect2(16, 0, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_i6g32"]
|
||||
atlas = ExtResource("1_0bpay")
|
||||
region = Rect2(32, 0, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_1l0tm"]
|
||||
atlas = ExtResource("1_0bpay")
|
||||
region = Rect2(48, 0, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_v158k"]
|
||||
atlas = ExtResource("1_0bpay")
|
||||
region = Rect2(64, 0, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_h4fw4"]
|
||||
atlas = ExtResource("1_0bpay")
|
||||
region = Rect2(80, 0, 16, 32)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_ebmjs"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_3dryh")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_wowpa")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_i6g32")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_1l0tm")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_v158k")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_h4fw4")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"idle",
|
||||
"speed": 8.0
|
||||
}]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_5wxv7"]
|
||||
radius = 50.0
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_y5hcb"]
|
||||
radius = 7.0
|
||||
|
||||
[sub_resource type="QuadMesh" id="QuadMesh_5wxv7"]
|
||||
size = Vector2(100, 100)
|
||||
|
||||
[node name="Turret" type="Node2D"]
|
||||
y_sort_enabled = true
|
||||
texture_filter = 1
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
self_modulate = Color(1.8247963, 1.8247963, 1.8247963, 1)
|
||||
sprite_frames = SubResource("SpriteFrames_ebmjs")
|
||||
animation = &"idle"
|
||||
autoplay = "idle"
|
||||
frame_progress = 0.8244228
|
||||
offset = Vector2(0, -16)
|
||||
|
||||
[node name="Scripts" type="Node" parent="."]
|
||||
|
||||
[node name="Turret" type="Node" parent="Scripts" node_paths=PackedStringArray("_Attackrange", "_parent", "_projectilePool")]
|
||||
script = ExtResource("2_jjtgc")
|
||||
_Attackrange = NodePath("../../ShootArea")
|
||||
_fireRate = 1.0
|
||||
_parent = NodePath("../..")
|
||||
_projectilePool = NodePath("../ProjectilePool")
|
||||
|
||||
[node name="ProjectilePool" type="Node" parent="Scripts"]
|
||||
script = ExtResource("3_d0rgn")
|
||||
_scene = ExtResource("4_jjtgc")
|
||||
_poolSize = 10
|
||||
|
||||
[node name="ShootArea" type="Area2D" parent="."]
|
||||
collision_layer = 0
|
||||
collision_mask = 4
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="ShootArea"]
|
||||
rotation = 1.5707964
|
||||
shape = SubResource("CircleShape2D_5wxv7")
|
||||
|
||||
[node name="PlacementCollider" type="Area2D" parent="."]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="PlacementCollider"]
|
||||
position = Vector2(0, -5)
|
||||
rotation = 1.5707964
|
||||
shape = SubResource("CircleShape2D_y5hcb")
|
||||
|
||||
[node name="MeshInstance2D" type="MeshInstance2D" parent="."]
|
||||
visible = false
|
||||
mesh = SubResource("QuadMesh_5wxv7")
|
||||
@@ -1,83 +0,0 @@
|
||||
[gd_scene load_steps=11 format=3 uid="uid://cx7gr555b1gov"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://be7hl01iuo5af" path="res://Assets/Sprites/Characters/Player/kitsune-Sheet.png" id="1_5wxv7"]
|
||||
[ext_resource type="Script" uid="uid://8drbh4rcl410" path="res://Scripts/PlayerMovement.cs" id="2_y5hcb"]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_wrm1d"]
|
||||
radius = 2.0
|
||||
height = 10.0
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3dryh"]
|
||||
atlas = ExtResource("1_5wxv7")
|
||||
region = Rect2(0, 0, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wowpa"]
|
||||
atlas = ExtResource("1_5wxv7")
|
||||
region = Rect2(16, 0, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_i6g32"]
|
||||
atlas = ExtResource("1_5wxv7")
|
||||
region = Rect2(32, 0, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_1l0tm"]
|
||||
atlas = ExtResource("1_5wxv7")
|
||||
region = Rect2(48, 0, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_v158k"]
|
||||
atlas = ExtResource("1_5wxv7")
|
||||
region = Rect2(64, 0, 16, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_h4fw4"]
|
||||
atlas = ExtResource("1_5wxv7")
|
||||
region = Rect2(80, 0, 16, 32)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_ebmjs"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_3dryh")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_wowpa")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_i6g32")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_1l0tm")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_v158k")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_h4fw4")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"idle",
|
||||
"speed": 8.0
|
||||
}]
|
||||
|
||||
[node name="Player" type="CharacterBody2D"]
|
||||
y_sort_enabled = true
|
||||
texture_filter = 1
|
||||
collision_layer = 2
|
||||
collision_mask = 5
|
||||
motion_mode = 1
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(0, -2)
|
||||
rotation = 1.5707964
|
||||
shape = SubResource("CapsuleShape2D_wrm1d")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
sprite_frames = SubResource("SpriteFrames_ebmjs")
|
||||
animation = &"idle"
|
||||
frame_progress = 0.8244228
|
||||
offset = Vector2(0, -16)
|
||||
|
||||
[node name="Scripts" type="Node" parent="."]
|
||||
|
||||
[node name="Movement" type="Node" parent="Scripts" node_paths=PackedStringArray("_body2D")]
|
||||
script = ExtResource("2_y5hcb")
|
||||
_body2D = NodePath("../..")
|
||||
_speed = 4000.0
|
||||
@@ -1,86 +0,0 @@
|
||||
[gd_resource type="TileSet" load_steps=3 format=3 uid="uid://b15j7vhkfu415"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cs7vjtoap8v26" path="res://Assets/Sprites/Environments/environment.png" id="1_weel8"]
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_12wsl"]
|
||||
texture = ExtResource("1_weel8")
|
||||
0:0/0 = 0
|
||||
0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(0, 8, 0, 0, 8, 0, 8, -8, -8, -8, -8, 8)
|
||||
2:2/0 = 0
|
||||
2:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 0, 0, 0, -8, 8, -8, 8, 8, -8, 8)
|
||||
1:2/0 = 0
|
||||
1:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 8, 0, 8, 8, -8, 8)
|
||||
0:2/0 = 0
|
||||
0:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 0, -8, 0, 0, 8, 0, 8, 8, -8, 8)
|
||||
0:1/0 = 0
|
||||
0:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 0, -8, 0, 8, -8, 8)
|
||||
1:0/0 = 0
|
||||
1:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 0, -8, 0)
|
||||
1:1/0 = 0
|
||||
2:1/0 = 0
|
||||
2:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(0, -8, 0, 8, 8, 8, 8, -8)
|
||||
2:0/0 = 0
|
||||
2:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 0, 0, 0, 8, 8, 8, 8, -8, -8, -8)
|
||||
3:0/0 = 0
|
||||
3:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(0, 8, 0, 0, 8, 0, 8, -8, -8, -8, -8, 8)
|
||||
3:1/0 = 0
|
||||
3:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(0, -8, 0, 8, -8, 8, -8, -8)
|
||||
3:2/0 = 0
|
||||
3:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(0, -8, 0, 0, 8, 0, 8, 8, -8, 8, -8, -8)
|
||||
4:2/0 = 0
|
||||
4:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 8, 0, 8, 8, -8, 8)
|
||||
4:1/0 = 0
|
||||
4:0/0 = 0
|
||||
4:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 8, 0, 8, -8, -8, -8)
|
||||
5:0/0 = 0
|
||||
5:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 0, 0, 0, 8, 8, 8, 8, -8, -8, -8)
|
||||
5:1/0 = 0
|
||||
5:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(0, -8, 0, 8, 8, 8, 8, -8)
|
||||
5:2/0 = 0
|
||||
5:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 0, 0, 0, -8, 8, -8, 8, 8, -8, 8)
|
||||
7:1/0 = 0
|
||||
8:1/0 = 0
|
||||
9:1/0 = 0
|
||||
7:2/0 = 0
|
||||
8:2/0 = 0
|
||||
9:2/0 = 0
|
||||
8:4/size_in_atlas = Vector2i(1, 2)
|
||||
8:4/0 = 0
|
||||
8:4/0/texture_origin = Vector2i(0, 8)
|
||||
8:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 8, 0, 8, 8, -8, 8)
|
||||
9:4/size_in_atlas = Vector2i(1, 2)
|
||||
9:4/0 = 0
|
||||
9:4/0/texture_origin = Vector2i(0, 8)
|
||||
9:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 6, 0, 6, 8, -8, 8)
|
||||
0:4/size_in_atlas = Vector2i(4, 5)
|
||||
0:4/0 = 0
|
||||
0:4/0/texture_origin = Vector2i(0, 32)
|
||||
0:4/0/y_sort_origin = -4
|
||||
0:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -4, 8, -4, 12, 4, -12, 4)
|
||||
7:4/size_in_atlas = Vector2i(1, 2)
|
||||
7:4/0 = 0
|
||||
7:4/0/texture_origin = Vector2i(0, 8)
|
||||
7:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-6, 0, 8, 0, 8, 8, -6, 8)
|
||||
4:7/size_in_atlas = Vector2i(2, 2)
|
||||
4:7/0 = 0
|
||||
4:7/0/texture_origin = Vector2i(0, 8)
|
||||
4:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 0, 16, 0, 12, 8, -12, 8)
|
||||
5:6/0 = 0
|
||||
5:6/0/y_sort_origin = 4
|
||||
5:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 6, -6, 8, 6, 8, 8, 6, 8, 4, -8, 4)
|
||||
7:7/size_in_atlas = Vector2i(1, 2)
|
||||
7:7/0 = 0
|
||||
7:7/0/texture_origin = Vector2i(0, 8)
|
||||
7:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 0.9892235, 0, 8, 0, 8, 8, -8, 8)
|
||||
8:7/size_in_atlas = Vector2i(1, 2)
|
||||
8:7/0 = 0
|
||||
8:7/0/texture_origin = Vector2i(0, 8)
|
||||
8:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 8, 0, 8, 8, -8, 8)
|
||||
9:7/size_in_atlas = Vector2i(1, 2)
|
||||
9:7/0 = 0
|
||||
9:7/0/texture_origin = Vector2i(0, 8)
|
||||
9:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 8, 0, 8, 8, -8, 8)
|
||||
|
||||
[resource]
|
||||
physics_layer_0/collision_layer = 1
|
||||
sources/0 = SubResource("TileSetAtlasSource_12wsl")
|
||||
@@ -0,0 +1,8 @@
|
||||
[gd_resource type="Environment" format=3 uid="uid://cg7bginhcdl5w"]
|
||||
|
||||
[resource]
|
||||
background_mode = 3
|
||||
background_color = Color(0.1254902, 0.1254902, 0.1254902, 1)
|
||||
ambient_light_color = Color(0.1254902, 0.1254902, 0.1254902, 1)
|
||||
glow_enabled = true
|
||||
glow_blend_mode = 1
|
||||
@@ -0,0 +1,383 @@
|
||||
[gd_resource type="TileSet" load_steps=3 format=3 uid="uid://b15j7vhkfu415"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cs7vjtoap8v26" path="res://Assets/Sprites/Environments/environment.png" id="1_7wjyg"]
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_12wsl"]
|
||||
texture = ExtResource("1_7wjyg")
|
||||
0:0/0 = 0
|
||||
0:0/0/terrain_set = 0
|
||||
0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(0, 8, 4, 4, 8, 0, 8, -4, 4, -4, 0, 0, -4, 4, -4, 8)
|
||||
0:0/0/terrains_peering_bit/bottom_right_corner = 0
|
||||
2:2/0 = 0
|
||||
2:2/0/terrain_set = 0
|
||||
2:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 0, -8, 4, -8, 4, -4, 0, 0, -4, 4, -8, 4)
|
||||
2:2/0/terrains_peering_bit/top_left_corner = 0
|
||||
1:2/0 = 0
|
||||
1:2/0/terrain_set = 0
|
||||
1:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 8, 0, 8, 4, -8, 4)
|
||||
1:2/0/terrains_peering_bit/top_left_corner = 0
|
||||
1:2/0/terrains_peering_bit/top_side = 0
|
||||
1:2/0/terrains_peering_bit/top_right_corner = 0
|
||||
0:2/0 = 0
|
||||
0:2/0/terrain_set = 0
|
||||
0:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-4, -8, 0, -8, 4, -4, 8, 0, 8, 4, 4, 4, 0, 0, -4, -4)
|
||||
0:2/0/terrains_peering_bit/top_right_corner = 0
|
||||
0:1/0 = 0
|
||||
0:1/0/terrain_set = 0
|
||||
0:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-4, -8, 0, -8, 0, 8, -4, 8)
|
||||
0:1/0/terrains_peering_bit/right_side = 0
|
||||
0:1/0/terrains_peering_bit/bottom_right_corner = 0
|
||||
0:1/0/terrains_peering_bit/top_right_corner = 0
|
||||
1:0/0 = 0
|
||||
1:0/0/terrain_set = 0
|
||||
1:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -4, 8, -4, 8, 0, -8, 0)
|
||||
1:0/0/terrains_peering_bit/bottom_right_corner = 0
|
||||
1:0/0/terrains_peering_bit/bottom_side = 0
|
||||
1:0/0/terrains_peering_bit/bottom_left_corner = 0
|
||||
1:1/0 = 0
|
||||
1:1/0/terrain_set = 0
|
||||
1:1/0/terrain = 0
|
||||
1:1/0/terrains_peering_bit/right_side = 0
|
||||
1:1/0/terrains_peering_bit/bottom_right_corner = 0
|
||||
1:1/0/terrains_peering_bit/bottom_side = 0
|
||||
1:1/0/terrains_peering_bit/bottom_left_corner = 0
|
||||
1:1/0/terrains_peering_bit/left_side = 0
|
||||
1:1/0/terrains_peering_bit/top_left_corner = 0
|
||||
1:1/0/terrains_peering_bit/top_side = 0
|
||||
1:1/0/terrains_peering_bit/top_right_corner = 0
|
||||
2:1/0 = 0
|
||||
2:1/0/terrain_set = 0
|
||||
2:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(0, -8, 0, 8, 4, 8, 4, -8)
|
||||
2:1/0/terrains_peering_bit/bottom_left_corner = 0
|
||||
2:1/0/terrains_peering_bit/left_side = 0
|
||||
2:1/0/terrains_peering_bit/top_left_corner = 0
|
||||
2:0/0 = 0
|
||||
2:0/0/terrain_set = 0
|
||||
2:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, -4, 4, 0, 8, 4, 8, 4, 4, 0, 0, -4, -4, -8, -4)
|
||||
2:0/0/terrains_peering_bit/bottom_left_corner = 0
|
||||
3:0/0 = 0
|
||||
3:0/0/terrain_set = 0
|
||||
3:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(0, 8, 4, 8, 6, 6, 8, 4, 8, 0, 4, 4)
|
||||
3:0/0/terrains_peering_bit/bottom_left_corner = 0
|
||||
3:0/0/terrains_peering_bit/left_side = 0
|
||||
3:0/0/terrains_peering_bit/top_left_corner = 0
|
||||
3:0/0/terrains_peering_bit/top_side = 0
|
||||
3:0/0/terrains_peering_bit/top_right_corner = 0
|
||||
3:1/0 = 0
|
||||
3:1/0/terrain_set = 0
|
||||
3:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(0, -8, 4, -8, 4, 8, 0, 8)
|
||||
3:1/0/terrains_peering_bit/bottom_left_corner = 0
|
||||
3:1/0/terrains_peering_bit/left_side = 0
|
||||
3:1/0/terrains_peering_bit/top_left_corner = 0
|
||||
3:2/0 = 0
|
||||
3:2/0/terrain_set = 0
|
||||
3:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(8, 0, 8, -4, 6, -6, 4, -8, 0, -8, 4, -4)
|
||||
3:2/0/terrains_peering_bit/bottom_right_corner = 0
|
||||
3:2/0/terrains_peering_bit/bottom_side = 0
|
||||
3:2/0/terrains_peering_bit/bottom_left_corner = 0
|
||||
3:2/0/terrains_peering_bit/left_side = 0
|
||||
3:2/0/terrains_peering_bit/top_left_corner = 0
|
||||
4:2/0 = 0
|
||||
4:2/0/terrain_set = 0
|
||||
4:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(8, 0, 8, -4, -8, -4, -8, 0)
|
||||
4:2/0/terrains_peering_bit/bottom_right_corner = 0
|
||||
4:2/0/terrains_peering_bit/bottom_side = 0
|
||||
4:2/0/terrains_peering_bit/bottom_left_corner = 0
|
||||
4:1/0 = 0
|
||||
4:0/0 = 0
|
||||
4:0/0/terrain_set = 0
|
||||
4:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, -8, 4, 8, 4, 8, 0)
|
||||
4:0/0/terrains_peering_bit/top_left_corner = 0
|
||||
4:0/0/terrains_peering_bit/top_side = 0
|
||||
4:0/0/terrains_peering_bit/top_right_corner = 0
|
||||
5:0/0 = 0
|
||||
5:0/0/terrain_set = 0
|
||||
5:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, -8, 4, -6, 6, -4, 8, 0, 8, -4, 4)
|
||||
5:0/0/terrains_peering_bit/right_side = 0
|
||||
5:0/0/terrains_peering_bit/bottom_right_corner = 0
|
||||
5:0/0/terrains_peering_bit/top_left_corner = 0
|
||||
5:0/0/terrains_peering_bit/top_side = 0
|
||||
5:0/0/terrains_peering_bit/top_right_corner = 0
|
||||
5:1/0 = 0
|
||||
5:1/0/terrain_set = 0
|
||||
5:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(0, -8, -4, -8, -4, 8, 0, 8)
|
||||
5:1/0/terrains_peering_bit/right_side = 0
|
||||
5:1/0/terrains_peering_bit/bottom_right_corner = 0
|
||||
5:1/0/terrains_peering_bit/top_right_corner = 0
|
||||
5:2/0 = 0
|
||||
5:2/0/terrain_set = 0
|
||||
5:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(0, -8, -4, -8, -6, -6, -8, -4, -8, 0, -4, -4)
|
||||
5:2/0/terrains_peering_bit/right_side = 0
|
||||
5:2/0/terrains_peering_bit/bottom_right_corner = 0
|
||||
5:2/0/terrains_peering_bit/bottom_side = 0
|
||||
5:2/0/terrains_peering_bit/bottom_left_corner = 0
|
||||
5:2/0/terrains_peering_bit/top_right_corner = 0
|
||||
8:4/size_in_atlas = Vector2i(1, 2)
|
||||
8:4/next_alternative_id = 4
|
||||
8:4/0 = 0
|
||||
8:4/0/texture_origin = Vector2i(0, 8)
|
||||
8:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 8, 0, 8, 8, -8, 8)
|
||||
9:4/size_in_atlas = Vector2i(1, 2)
|
||||
9:4/0 = 0
|
||||
9:4/0/texture_origin = Vector2i(0, 8)
|
||||
9:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 6, 0, 6, 8, -8, 8)
|
||||
0:4/size_in_atlas = Vector2i(4, 5)
|
||||
0:4/0 = 0
|
||||
0:4/0/texture_origin = Vector2i(0, 32)
|
||||
0:4/0/y_sort_origin = -4
|
||||
0:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -4, 8, -4, 12, 4, -12, 4)
|
||||
7:4/size_in_atlas = Vector2i(1, 2)
|
||||
7:4/0 = 0
|
||||
7:4/0/texture_origin = Vector2i(0, 8)
|
||||
7:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-6, 0, 8, 0, 8, 8, -6, 8)
|
||||
4:7/size_in_atlas = Vector2i(2, 2)
|
||||
4:7/0 = 0
|
||||
4:7/0/texture_origin = Vector2i(0, 8)
|
||||
4:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 0, 16, 0, 12, 8, -12, 8)
|
||||
5:6/0 = 0
|
||||
5:6/0/y_sort_origin = 4
|
||||
5:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 6, -6, 8, 6, 8, 8, 6, 8, 4, -8, 4)
|
||||
7:7/size_in_atlas = Vector2i(1, 2)
|
||||
7:7/0 = 0
|
||||
7:7/0/texture_origin = Vector2i(0, 8)
|
||||
7:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 0.9892235, 0, 8, 0, 8, 8, -8, 8)
|
||||
8:7/size_in_atlas = Vector2i(1, 2)
|
||||
8:7/0 = 0
|
||||
8:7/0/texture_origin = Vector2i(0, 8)
|
||||
8:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 8, 0, 8, 8, -8, 8)
|
||||
9:7/size_in_atlas = Vector2i(1, 2)
|
||||
9:7/0 = 0
|
||||
9:7/0/texture_origin = Vector2i(0, 8)
|
||||
9:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 8, 0, 8, 8, -8, 8)
|
||||
13:0/0 = 0
|
||||
13:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-7, 0, 8, 0, 8, 8, -7, 8)
|
||||
14:0/0 = 0
|
||||
14:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(8, 0, -8, 0, -8, 8, 8, 8)
|
||||
15:0/0 = 0
|
||||
15:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(7, 0, -8, 0, -8, 8, 7, 8)
|
||||
13:1/0 = 0
|
||||
13:1/0/y_sort_origin = -8
|
||||
13:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-4, -8, -7, -8, -7, 8, -6, 8, -6, 16, -4, 16)
|
||||
15:1/0 = 0
|
||||
15:1/0/y_sort_origin = -8
|
||||
15:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(4, -8, 7, -8, 7, 8, 6, 8, 6, 16, 4, 16)
|
||||
13:2/0 = 0
|
||||
13:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-6, 0, 8, 0, 8, 8, -6, 8)
|
||||
15:2/0 = 0
|
||||
15:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(6, 0, -8, 0, -8, 8, 6, 8)
|
||||
16:0/0 = 0
|
||||
16:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(4, 0, 8, 0, 8, 8, 4, 8)
|
||||
16:1/next_alternative_id = 2
|
||||
16:1/0 = 0
|
||||
16:1/0/y_sort_origin = -8
|
||||
16:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(4, -8, 7, -8, 7, 8, 4, 8)
|
||||
16:2/0 = 0
|
||||
16:2/0/y_sort_origin = 7
|
||||
16:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(4, -8, 7, -8, 7, 8, 4, 8)
|
||||
17:0/0 = 0
|
||||
17:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 8, 0, 8, 8, -8, 8)
|
||||
18:0/0 = 0
|
||||
18:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 8, 0, 8, 8, -8, 8)
|
||||
19:0/0 = 0
|
||||
19:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-4, 0, -8, 0, -8, 8, -4, 8)
|
||||
19:1/next_alternative_id = 2
|
||||
19:1/0 = 0
|
||||
19:1/0/y_sort_origin = -8
|
||||
19:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-4, -8, -7, -8, -7, 8, -4, 8)
|
||||
19:2/0 = 0
|
||||
19:2/0/y_sort_origin = 7
|
||||
19:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-4, -8, -7, -8, -7, 8, -4, 8)
|
||||
14:6/size_in_atlas = Vector2i(1, 2)
|
||||
14:6/0 = 0
|
||||
14:6/0/texture_origin = Vector2i(0, 8)
|
||||
14:6/0/y_sort_origin = 7
|
||||
14:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-4, -24, -7, -24, -7, 8, -4, 8)
|
||||
14:4/size_in_atlas = Vector2i(1, 2)
|
||||
14:4/0 = 0
|
||||
14:4/0/texture_origin = Vector2i(0, 8)
|
||||
14:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(8, 0, -7, 0, -7, 8, 8, 8)
|
||||
15:4/size_in_atlas = Vector2i(1, 2)
|
||||
15:4/0 = 0
|
||||
15:4/0/texture_origin = Vector2i(0, 8)
|
||||
15:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(8, 0, -8, 0, -8, 8, 8, 8)
|
||||
16:4/size_in_atlas = Vector2i(1, 2)
|
||||
16:4/0 = 0
|
||||
16:4/0/texture_origin = Vector2i(0, 8)
|
||||
16:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-4, 0, -8, 0, -8, 8, -6, 8, -6, 32, -4, 32)
|
||||
16:6/size_in_atlas = Vector2i(1, 2)
|
||||
16:6/0 = 0
|
||||
16:6/0/texture_origin = Vector2i(0, 8)
|
||||
16:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(8, 0, -6, 0, -6, 8, 8, 8)
|
||||
17:6/size_in_atlas = Vector2i(1, 2)
|
||||
17:6/0 = 0
|
||||
17:6/0/texture_origin = Vector2i(0, 8)
|
||||
17:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 6, 0, 6, 8, -8, 8)
|
||||
17:4/size_in_atlas = Vector2i(1, 2)
|
||||
17:4/0 = 0
|
||||
17:4/0/texture_origin = Vector2i(0, 8)
|
||||
17:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(4, 0, 8, 0, 8, 8, 6, 8, 6, 32, 4, 32)
|
||||
18:4/size_in_atlas = Vector2i(1, 2)
|
||||
18:4/0 = 0
|
||||
18:4/0/texture_origin = Vector2i(0, 8)
|
||||
18:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 8, 0, 8, 8, -8, 8)
|
||||
19:4/size_in_atlas = Vector2i(1, 2)
|
||||
19:4/0 = 0
|
||||
19:4/0/texture_origin = Vector2i(0, 8)
|
||||
19:4/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 0, 7, 0, 7, 8, -8, 8)
|
||||
19:6/size_in_atlas = Vector2i(1, 2)
|
||||
19:6/0 = 0
|
||||
19:6/0/texture_origin = Vector2i(0, 8)
|
||||
19:6/0/y_sort_origin = 7
|
||||
19:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(4, -24, 7, -24, 7, 8, 4, 8)
|
||||
9:2/0 = 0
|
||||
8:2/0 = 0
|
||||
7:2/0 = 0
|
||||
9:1/0 = 0
|
||||
8:1/0 = 0
|
||||
7:1/0 = 0
|
||||
11:6/size_in_atlas = Vector2i(2, 3)
|
||||
11:6/0 = 0
|
||||
11:6/0/texture_origin = Vector2i(0, 16)
|
||||
11:6/0/y_sort_origin = 5
|
||||
11:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-16, 8, -16, 5, 16, 5, 16, 8)
|
||||
20:1/0 = 0
|
||||
20:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(6, 0, 8, 0, 8, 8, 6, 8)
|
||||
23:1/0 = 0
|
||||
23:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-6, 8, -8, 8, -8, 0, -6, 0)
|
||||
20:3/size_in_atlas = Vector2i(1, 2)
|
||||
20:3/next_alternative_id = 2
|
||||
20:3/0 = 0
|
||||
20:3/0/texture_origin = Vector2i(0, 8)
|
||||
20:3/0/y_sort_origin = 7
|
||||
20:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(8, 0, 6, 0, 6, 8, 8, 8)
|
||||
20:3/1 = 1
|
||||
20:3/1/texture_origin = Vector2i(0, 8)
|
||||
20:3/1/y_sort_origin = -24
|
||||
20:3/1/physics_layer_0/polygon_0/points = PackedVector2Array(6, 8, 8, 8, 8, -24, 4, -24, 4, -20, 6, -20)
|
||||
23:3/size_in_atlas = Vector2i(1, 2)
|
||||
23:3/next_alternative_id = 2
|
||||
23:3/0 = 0
|
||||
23:3/0/texture_origin = Vector2i(0, 8)
|
||||
23:3/0/y_sort_origin = 7
|
||||
23:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, 8, -6, 8, -6, 0, -8, 0)
|
||||
23:3/1 = 1
|
||||
23:3/1/texture_origin = Vector2i(0, 8)
|
||||
23:3/1/y_sort_origin = -24
|
||||
23:3/1/physics_layer_0/polygon_0/points = PackedVector2Array(-6, 8, -8, 8, -8, -24, -4, -24, -4, -20, -6, -20)
|
||||
7:0/0 = 0
|
||||
8:0/0 = 0
|
||||
9:0/0 = 0
|
||||
21:6/0 = 0
|
||||
21:6/0/terrain_set = 1
|
||||
21:6/0/terrain = 0
|
||||
21:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||
21:6/0/terrains_peering_bit/right_side = 0
|
||||
21:6/0/terrains_peering_bit/bottom_side = 0
|
||||
21:7/0 = 0
|
||||
21:7/0/terrain_set = 1
|
||||
21:7/0/terrain = 0
|
||||
21:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||
21:7/0/terrains_peering_bit/bottom_side = 0
|
||||
21:7/0/terrains_peering_bit/top_side = 0
|
||||
21:8/0 = 0
|
||||
21:8/0/terrain_set = 1
|
||||
21:8/0/terrain = 0
|
||||
21:8/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||
21:8/0/terrains_peering_bit/right_side = 0
|
||||
21:8/0/terrains_peering_bit/top_side = 0
|
||||
22:8/0 = 0
|
||||
22:8/0/terrain_set = 1
|
||||
22:8/0/terrain = 0
|
||||
22:8/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||
22:8/0/terrains_peering_bit/right_side = 0
|
||||
22:8/0/terrains_peering_bit/left_side = 0
|
||||
23:8/0 = 0
|
||||
23:8/0/terrain_set = 1
|
||||
23:8/0/terrain = 0
|
||||
23:8/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||
23:8/0/terrains_peering_bit/left_side = 0
|
||||
23:8/0/terrains_peering_bit/top_side = 0
|
||||
23:7/0 = 0
|
||||
23:7/0/terrain_set = 1
|
||||
23:7/0/terrain = 0
|
||||
23:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||
23:7/0/terrains_peering_bit/bottom_side = 0
|
||||
23:7/0/terrains_peering_bit/top_side = 0
|
||||
23:6/0 = 0
|
||||
23:6/0/terrain_set = 1
|
||||
23:6/0/terrain = 0
|
||||
23:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||
23:6/0/terrains_peering_bit/bottom_side = 0
|
||||
23:6/0/terrains_peering_bit/left_side = 0
|
||||
22:6/0 = 0
|
||||
22:6/0/terrain_set = 1
|
||||
22:6/0/terrain = 0
|
||||
22:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||
22:6/0/terrains_peering_bit/right_side = 0
|
||||
22:6/0/terrains_peering_bit/left_side = 0
|
||||
24:8/0 = 0
|
||||
24:8/0/terrain_set = 1
|
||||
24:8/0/terrain = 0
|
||||
24:8/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||
24:8/0/terrains_peering_bit/top_side = 0
|
||||
24:7/0 = 0
|
||||
24:7/0/terrain_set = 1
|
||||
24:7/0/terrain = 0
|
||||
24:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||
24:7/0/terrains_peering_bit/bottom_side = 0
|
||||
24:6/0 = 0
|
||||
24:6/0/terrain_set = 1
|
||||
24:6/0/terrain = 0
|
||||
24:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||
24:6/0/terrains_peering_bit/right_side = 0
|
||||
24:6/0/terrains_peering_bit/bottom_side = 0
|
||||
24:6/0/terrains_peering_bit/left_side = 0
|
||||
24:6/0/terrains_peering_bit/top_side = 0
|
||||
25:6/0 = 0
|
||||
25:6/0/terrain_set = 1
|
||||
25:6/0/terrain = 0
|
||||
25:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||
25:6/0/terrains_peering_bit/right_side = 0
|
||||
25:6/0/terrains_peering_bit/bottom_side = 0
|
||||
25:6/0/terrains_peering_bit/left_side = 0
|
||||
25:7/0 = 0
|
||||
25:7/0/terrain_set = 1
|
||||
25:7/0/terrain = 0
|
||||
25:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||
25:7/0/terrains_peering_bit/right_side = 0
|
||||
25:7/0/terrains_peering_bit/bottom_side = 0
|
||||
25:7/0/terrains_peering_bit/top_side = 0
|
||||
26:7/0 = 0
|
||||
26:7/0/terrain_set = 1
|
||||
26:7/0/terrain = 0
|
||||
26:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||
26:7/0/terrains_peering_bit/right_side = 0
|
||||
26:7/0/terrains_peering_bit/left_side = 0
|
||||
26:7/0/terrains_peering_bit/top_side = 0
|
||||
26:6/0 = 0
|
||||
26:6/0/terrain_set = 1
|
||||
26:6/0/terrain = 0
|
||||
26:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||
26:6/0/terrains_peering_bit/bottom_side = 0
|
||||
26:6/0/terrains_peering_bit/left_side = 0
|
||||
26:6/0/terrains_peering_bit/top_side = 0
|
||||
25:8/0 = 0
|
||||
25:8/0/terrain_set = 1
|
||||
25:8/0/terrain = 0
|
||||
25:8/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||
25:8/0/terrains_peering_bit/right_side = 0
|
||||
26:8/0 = 0
|
||||
26:8/0/terrain_set = 1
|
||||
26:8/0/terrain = 0
|
||||
26:8/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||
26:8/0/terrains_peering_bit/left_side = 0
|
||||
|
||||
[resource]
|
||||
physics_layer_0/collision_layer = 1
|
||||
terrain_set_0/mode = 0
|
||||
terrain_set_0/terrain_0/name = "Terrain 0"
|
||||
terrain_set_0/terrain_0/color = Color(0.5, 0.34375, 0.25, 1)
|
||||
terrain_set_1/mode = 0
|
||||
terrain_set_1/terrain_0/name = "Terrain 0"
|
||||
terrain_set_1/terrain_0/color = Color(0.5, 0.34375, 0.25, 1)
|
||||
sources/0 = SubResource("TileSetAtlasSource_12wsl")
|
||||
@@ -0,0 +1,69 @@
|
||||
using System;
|
||||
using Godot;
|
||||
|
||||
public partial class CameraController : Camera2D
|
||||
{
|
||||
[Export] public float ZoomStep = 0.1f;
|
||||
[Export] public float MinZoom = 0.5f;
|
||||
[Export] public float MaxZoom = 3.0f;
|
||||
|
||||
[Export] private float minX = 0f;
|
||||
[Export] private float maxX = 0f;
|
||||
[Export] private float minY = 0f;
|
||||
[Export] private float maxY = 0f;
|
||||
|
||||
private bool _dragging;
|
||||
private Vector2 _grabWorldPos;
|
||||
|
||||
public override void _Input(InputEvent @event)
|
||||
{
|
||||
// Middle mouse drag
|
||||
if (@event is InputEventMouseButton mb)
|
||||
{
|
||||
if (mb.ButtonIndex == MouseButton.Middle)
|
||||
{
|
||||
_dragging = mb.Pressed;
|
||||
|
||||
if (_dragging)
|
||||
_grabWorldPos = GetGlobalMousePosition();
|
||||
}
|
||||
|
||||
// Scroll zoom
|
||||
if (mb.Pressed &&
|
||||
(mb.ButtonIndex == MouseButton.WheelUp ||
|
||||
mb.ButtonIndex == MouseButton.WheelDown))
|
||||
{
|
||||
Vector2 mouseBeforeZoom = GetGlobalMousePosition();
|
||||
|
||||
float zoomFactor = mb.ButtonIndex == MouseButton.WheelUp
|
||||
? -ZoomStep
|
||||
: ZoomStep;
|
||||
|
||||
float newZoom = Mathf.Clamp(Zoom.X + zoomFactor, MinZoom, MaxZoom);
|
||||
Zoom = new Vector2(newZoom, newZoom);
|
||||
|
||||
// keep cursor locked to same world point
|
||||
Vector2 mouseAfterZoom = GetGlobalMousePosition();
|
||||
GlobalPosition += mouseBeforeZoom - mouseAfterZoom;
|
||||
ClampPos();
|
||||
}
|
||||
}
|
||||
|
||||
if (_dragging && @event is InputEventMouseMotion)
|
||||
{
|
||||
Vector2 currentWorld = GetGlobalMousePosition();
|
||||
GlobalPosition += _grabWorldPos - currentWorld;
|
||||
ClampPos();
|
||||
}
|
||||
}
|
||||
|
||||
private void ClampPos()
|
||||
{
|
||||
var t = GetCanvasTransform();
|
||||
var camrect = t.AffineInverse().BasisXform(GetViewportRect().Size);
|
||||
GlobalPosition = new Vector2(
|
||||
Mathf.Clamp(GlobalPosition.X, LimitLeft + camrect.X / 2, LimitRight - camrect.X / 2),
|
||||
Mathf.Clamp(GlobalPosition.Y, LimitTop + camrect.Y / 2, LimitBottom - camrect.Y / 2)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://df0osorq00h7v
|
||||
@@ -5,7 +5,11 @@ public partial class GameController : Node
|
||||
{
|
||||
public static GameController Instance;
|
||||
|
||||
[Export] public Node2D Player;
|
||||
[Export] private float _ShrineStartHP;
|
||||
|
||||
public int Wave { get; private set; }
|
||||
public int Currency { get; private set; }
|
||||
public float ShrineHealth { get; private set; }
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
using Godot;
|
||||
|
||||
namespace fgj26.Scripts.Common;
|
||||
|
||||
public partial class ProjectileParent : Node2D
|
||||
{
|
||||
public static ProjectileParent Instance;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://dxx6nyrs12mr6
|
||||
@@ -0,0 +1,39 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class Health : Node
|
||||
{
|
||||
[Export] private Node2D _parent;
|
||||
[Export] private float _baseMaxHp;
|
||||
public float MaxHP { get; private set; }
|
||||
public float CurHP { get; private set; }
|
||||
|
||||
[Signal]
|
||||
public delegate void DeathEventHandler(Node2D node);
|
||||
|
||||
public override void _EnterTree()
|
||||
{
|
||||
CurHP = MaxHP = _baseMaxHp * Mathf.Pow(GameController.Instance.Wave, 1.067f);
|
||||
}
|
||||
|
||||
public void Substract(float v)
|
||||
{
|
||||
v = Mathf.Abs(v);
|
||||
CurHP -= v;
|
||||
if (CurHP <= 0)
|
||||
{
|
||||
EmitSignalDeath(_parent);
|
||||
}
|
||||
}
|
||||
|
||||
public void Add(float v)
|
||||
{
|
||||
v = Mathf.Abs(v);
|
||||
CurHP = Math.Clamp(CurHP + v, 0f, MaxHP);
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
CurHP = MaxHP = _baseMaxHp * Mathf.Pow(GameController.Instance.Wave, 1.067f);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://dvkd1keu854so
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using Godot;
|
||||
|
||||
public partial class Enemy : PathFollow2D
|
||||
{
|
||||
[Export] public EnemyType Type;
|
||||
[Export] public Health Health;
|
||||
|
||||
public event Action<Enemy> Died;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
Health.Death += _ => Died?.Invoke(this);
|
||||
}
|
||||
|
||||
public void ResetEnemy()
|
||||
{
|
||||
GlobalPosition = Vector2.Zero;
|
||||
Rotation = 0f;
|
||||
Visible = true;
|
||||
ProcessMode = ProcessModeEnum.Inherit;
|
||||
|
||||
Health.Reset();
|
||||
// reset velocity, animation, AI, etc here
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://bj52mq7uip7di
|
||||
@@ -0,0 +1,6 @@
|
||||
using Godot;
|
||||
|
||||
public partial class EnemyArea : Area2D
|
||||
{
|
||||
[Export] public Enemy Enemy { get; set; }
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://c247m8m3qmlk0
|
||||
@@ -3,24 +3,18 @@ using System;
|
||||
|
||||
public partial class EnemyMovement : Node
|
||||
{
|
||||
[Export] private NavigationAgent2D _agent2D;
|
||||
[Export] private CharacterBody2D _body2D;
|
||||
[Export] private PathFollow2D _pathFollow2D;
|
||||
[Export] private float _speed;
|
||||
|
||||
private double _time = 0;
|
||||
|
||||
public override void _PhysicsProcess(double delta)
|
||||
public override void _EnterTree()
|
||||
{
|
||||
_time += delta;
|
||||
if (_time > 0.2)
|
||||
{
|
||||
_time = 0;
|
||||
_agent2D.SetTargetPosition(GameController.Instance.Player.GlobalPosition);
|
||||
_pathFollow2D.ProgressRatio = 0;
|
||||
}
|
||||
// _parent.Position = _agent2D.GetNextPathPosition();
|
||||
var gpos = _agent2D.GetNextPathPosition();
|
||||
var dir = (gpos - _body2D.GlobalPosition).Normalized();
|
||||
// _body2D.SetVelocity(dir * _speed * (float)delta);
|
||||
_body2D.GlobalPosition += dir * _speed * (float)delta;
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
_pathFollow2D.ProgressRatio += (float)delta * (_speed / 1000f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
using Godot;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public enum EnemyType
|
||||
{
|
||||
Stone,
|
||||
Stump,
|
||||
Liquid
|
||||
}
|
||||
|
||||
public partial class EnemyPool : Node
|
||||
{
|
||||
[Export] private Godot.Collections.Dictionary<EnemyType, PackedScene> _scenes;
|
||||
[Export] private int _poolSize = 10;
|
||||
|
||||
private readonly Dictionary<EnemyType, Queue<Enemy>> _pool = new();
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
foreach (var kvp in _scenes)
|
||||
{
|
||||
var q = new Queue<Enemy>();
|
||||
_pool[kvp.Key] = q;
|
||||
|
||||
for (int i = 0; i < _poolSize; i++)
|
||||
q.Enqueue(CreateEnemy(kvp.Key));
|
||||
}
|
||||
}
|
||||
|
||||
private Enemy CreateEnemy(EnemyType type)
|
||||
{
|
||||
var e = _scenes[type].Instantiate<Enemy>();
|
||||
e.Died += ReturnToPool;
|
||||
return e;
|
||||
}
|
||||
|
||||
public Enemy Get(EnemyType type)
|
||||
{
|
||||
if (!_pool.TryGetValue(type, out var q))
|
||||
return null;
|
||||
|
||||
var e = q.Count > 0 ? q.Dequeue() : CreateEnemy(type);
|
||||
e.ResetEnemy();
|
||||
return e;
|
||||
}
|
||||
|
||||
private void ReturnToPool(Enemy e)
|
||||
{
|
||||
e.GetParent()?.RemoveChild(e);
|
||||
e.ProcessMode = ProcessModeEnum.Disabled;
|
||||
_pool[e.Type].Enqueue(e);
|
||||
}
|
||||
|
||||
public EnemyType GetRandomType()
|
||||
{
|
||||
var keys = new List<EnemyType>(_pool.Keys);
|
||||
return keys[GD.RandRange(0, keys.Count - 1)];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://bhxyvnirfeipr
|
||||
@@ -0,0 +1,39 @@
|
||||
using Godot;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public partial class EnemySpawner : Node
|
||||
{
|
||||
[Export] private Node _pathParent;
|
||||
[Export] private EnemyPool _pool;
|
||||
|
||||
private readonly List<Path2D> _paths = new();
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
foreach (var c in _pathParent.GetChildren())
|
||||
if (c is Path2D p)
|
||||
_paths.Add(p);
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
SpawnWithDelay(i * 0.33f);
|
||||
}
|
||||
|
||||
private async void SpawnWithDelay(float t)
|
||||
{
|
||||
await ToSignal(GetTree().CreateTimer(t), SceneTreeTimer.SignalName.Timeout);
|
||||
Spawn();
|
||||
}
|
||||
|
||||
private void Spawn()
|
||||
{
|
||||
if (_paths.Count == 0) return;
|
||||
|
||||
var path = _paths[GD.RandRange(0, _paths.Count - 1)];
|
||||
var type = _pool.GetRandomType();
|
||||
var enemy = _pool.Get(type);
|
||||
|
||||
if (enemy == null) return;
|
||||
|
||||
path.AddChild(enemy);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://cds2rrl4yjexf
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using Godot;
|
||||
|
||||
namespace fgj26.Scripts.Helpers;
|
||||
|
||||
public static class Helpers
|
||||
{
|
||||
public static Node2D GetClosest(Node2D from, Node2D[] targets)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(from);
|
||||
ArgumentNullException.ThrowIfNull(targets);
|
||||
if (targets.Length == 0) throw new ArgumentNullException(nameof(targets));
|
||||
float dist = float.PositiveInfinity;
|
||||
Node2D closest = null;
|
||||
foreach (var t in targets)
|
||||
{
|
||||
var td = t.GlobalPosition.DistanceTo(from.GlobalPosition);
|
||||
if (td < dist)
|
||||
{
|
||||
dist = td;
|
||||
closest = t;
|
||||
}
|
||||
}
|
||||
return closest;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://ef7d25f50nut
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
|
||||
public static class RandomHelper
|
||||
{
|
||||
// Single Random instance for the whole app
|
||||
private static readonly Random _rand = new Random();
|
||||
|
||||
// Random integer [min, max] inclusive
|
||||
public static int Int(int min, int max)
|
||||
{
|
||||
return _rand.Next(min, max + 1); // max is inclusive
|
||||
}
|
||||
|
||||
// Random float [min, max)
|
||||
public static float Float(float min, float max)
|
||||
{
|
||||
return (float)(_rand.NextDouble() * (max - min) + min);
|
||||
}
|
||||
|
||||
// Random double [min, max)
|
||||
public static double Double(double min, double max)
|
||||
{
|
||||
return _rand.NextDouble() * (max - min) + min;
|
||||
}
|
||||
|
||||
// Random element from an array
|
||||
public static T Choice<T>(T[] array)
|
||||
{
|
||||
if (array == null || array.Length == 0)
|
||||
throw new ArgumentException("Array cannot be null or empty.");
|
||||
return array[_rand.Next(array.Length)];
|
||||
}
|
||||
|
||||
// Random enum value
|
||||
public static T ChoiceEnum<T>() where T : Enum
|
||||
{
|
||||
Array values = Enum.GetValues(typeof(T)); // returns System.Array
|
||||
return (T)values.GetValue(_rand.Next(values.Length)); // use GetValue
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://dy2yccrqc1ho3
|
||||
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using Godot;
|
||||
using Godot.Collections;
|
||||
|
||||
public partial class Projectile : Node2D
|
||||
{
|
||||
[Export] private Array<EnemyType> _superEffective;
|
||||
[Export] private float _baseDamage;
|
||||
[Export] private float _speed;
|
||||
[Export] private Area2D _hurtBox;
|
||||
|
||||
private float _ttl = 10f;
|
||||
|
||||
public event Action<Projectile> OnDespawn;
|
||||
public Vector2 Direction;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
_hurtBox.AreaEntered += AreaEntered;
|
||||
_hurtBox.BodyEntered += BodyEntered;
|
||||
}
|
||||
|
||||
public override void _PhysicsProcess(double delta)
|
||||
{
|
||||
GlobalPosition += Direction * _speed * (float)delta;
|
||||
|
||||
_ttl -= (float)delta;
|
||||
if (_ttl > 0f) return;
|
||||
CallDeferred(nameof(Despawn));
|
||||
}
|
||||
|
||||
private void AreaEntered(Area2D area)
|
||||
{
|
||||
if (area is EnemyArea earea)
|
||||
{
|
||||
float isSe = _superEffective.Contains(earea.Enemy.Type) ? 2f : 1f;
|
||||
earea.Enemy.Health.Substract(_baseDamage * isSe);
|
||||
}
|
||||
|
||||
CallDeferred(nameof(Despawn));
|
||||
}
|
||||
|
||||
private void BodyEntered(Node2D node)
|
||||
{
|
||||
CallDeferred(nameof(Despawn));
|
||||
}
|
||||
|
||||
private void Despawn()
|
||||
{
|
||||
OnDespawn?.Invoke(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://ln2lt16fi47q
|
||||
@@ -0,0 +1,39 @@
|
||||
using System.Collections.Generic;
|
||||
using Godot;
|
||||
|
||||
|
||||
public partial class ProjectilePool : Node
|
||||
{
|
||||
[Export] private PackedScene _scene;
|
||||
[Export] private int _poolSize;
|
||||
|
||||
private readonly Queue<Projectile> _pool = new();
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
for (int i = 0; i < _poolSize; i++)
|
||||
{
|
||||
_pool.Enqueue(CreateProjectile());
|
||||
}
|
||||
}
|
||||
|
||||
private Projectile CreateProjectile()
|
||||
{
|
||||
var p = _scene.Instantiate<Projectile>();
|
||||
p.OnDespawn += ReturnToPool;
|
||||
return p;
|
||||
}
|
||||
|
||||
public Projectile Get()
|
||||
{
|
||||
var p = _pool.Count > 0 ? _pool.Dequeue() : CreateProjectile();
|
||||
return p;
|
||||
}
|
||||
|
||||
private void ReturnToPool(Projectile p)
|
||||
{
|
||||
p.GetParent()?.RemoveChild(p);
|
||||
p.ProcessMode = ProcessModeEnum.Disabled;
|
||||
_pool.Enqueue(p);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://cy00plvsi6vkn
|
||||
@@ -0,0 +1,56 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using fgj26.Scripts.Common;
|
||||
using fgj26.Scripts.Helpers;
|
||||
|
||||
public partial class Turret : Node
|
||||
{
|
||||
[Export] private Area2D _Attackrange;
|
||||
[Export] private float _fireRate;
|
||||
[Export] private Node2D _parent;
|
||||
[Export] private ProjectilePool _projectilePool;
|
||||
private float _fireTimer = 0f;
|
||||
|
||||
private HashSet<Enemy> _enemiesInRange = new HashSet<Enemy>();
|
||||
|
||||
public override void _EnterTree()
|
||||
{
|
||||
_Attackrange.AreaEntered += EnemyEntered;
|
||||
_Attackrange.AreaExited += EnemyExited;
|
||||
}
|
||||
|
||||
private void EnemyEntered(Area2D enemyHitBox)
|
||||
{
|
||||
if (enemyHitBox is EnemyArea earea)
|
||||
{
|
||||
_enemiesInRange.Add(earea.Enemy);
|
||||
GD.Print(earea.Name);
|
||||
}
|
||||
}
|
||||
|
||||
private void EnemyExited(Area2D enemyHitBox)
|
||||
{
|
||||
if (enemyHitBox is EnemyArea earea)
|
||||
{
|
||||
_enemiesInRange.Remove(earea.Enemy);
|
||||
GD.Print(earea.Name);
|
||||
}
|
||||
}
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
if (_enemiesInRange.Count == 0) return;
|
||||
_fireTimer += (float)delta;
|
||||
if (!(_fireTimer >= 1f / _fireRate)) return;
|
||||
_fireTimer = 0;
|
||||
var t = Helpers.GetClosest(_parent,_enemiesInRange.ToArray());
|
||||
var dir = (t.GlobalPosition - _parent.GlobalPosition).Normalized();
|
||||
var proj = _projectilePool.Get();
|
||||
proj.Direction = dir;
|
||||
proj.GlobalPosition = _parent.GlobalPosition;
|
||||
proj.Rotation = dir.Angle();
|
||||
ProjectileParent.Instance.AddChild(proj);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://cxrhl65cjw4yr
|
||||
@@ -0,0 +1,8 @@
|
||||
using Godot;
|
||||
|
||||
namespace fgj26.Scripts.Turrets;
|
||||
|
||||
public partial class TurretController : Node2D
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://b0uosq6r5dbqa
|
||||
@@ -61,3 +61,9 @@ attack={
|
||||
[physics]
|
||||
|
||||
2d/default_gravity_vector=Vector2(0, 0)
|
||||
|
||||
[rendering]
|
||||
|
||||
viewport/hdr_2d=true
|
||||
environment/defaults/default_clear_color=Color(0.1254902, 0.1254902, 0.1254902, 1)
|
||||
environment/defaults/default_environment="uid://cg7bginhcdl5w"
|
||||
|
||||