Added enemy sprites

This commit is contained in:
2025-11-27 14:59:16 +03:00
parent 79d942b803
commit 419e4db231
14 changed files with 159 additions and 58 deletions
-1
View File
@@ -23,7 +23,6 @@ signal destroyed
@onready var sprite := $Sprite2D @onready var sprite := $Sprite2D
@onready var collision := $CollisionShape2D
@export_range(0, 250) var acceleration : int = 0 @export_range(0, 250) var acceleration : int = 0
+2 -5
View File
@@ -1,11 +1,9 @@
[gd_scene load_steps=5 format=3 uid="uid://jvyagshykmgb"] [gd_scene load_steps=4 format=3 uid="uid://jvyagshykmgb"]
[ext_resource type="Script" uid="uid://cesibaqtrgotl" path="res://game/entities/ships/abstract_ship.gd" id="1_6isjb"] [ext_resource type="Script" uid="uid://cesibaqtrgotl" path="res://game/entities/ships/abstract_ship.gd" id="1_6isjb"]
[ext_resource type="PackedScene" uid="uid://clkymhkv3cevm" path="res://game/health_system/health.tscn" id="2_xxtvk"] [ext_resource type="PackedScene" uid="uid://clkymhkv3cevm" path="res://game/health_system/health.tscn" id="2_xxtvk"]
[ext_resource type="PackedScene" uid="uid://d2snum2pxc2ui" path="res://game/health_system/health_bar/heath_bar.tscn" id="3_l62e5"] [ext_resource type="PackedScene" uid="uid://d2snum2pxc2ui" path="res://game/health_system/health_bar/heath_bar.tscn" id="3_l62e5"]
[sub_resource type="CircleShape2D" id="CircleShape2D_xxtvk"]
[node name="AbstractShip" type="CharacterBody2D"] [node name="AbstractShip" type="CharacterBody2D"]
disable_mode = 1 disable_mode = 1
motion_mode = 1 motion_mode = 1
@@ -14,8 +12,7 @@ script = ExtResource("1_6isjb")
[node name="Sprite2D" type="Sprite2D" parent="."] [node name="Sprite2D" type="Sprite2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="."] [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
shape = SubResource("CircleShape2D_xxtvk")
[node name="Health" parent="." instance=ExtResource("2_xxtvk")] [node name="Health" parent="." instance=ExtResource("2_xxtvk")]
@@ -1,14 +1,8 @@
[gd_scene load_steps=5 format=3 uid="uid://d3epy8w15qmjm"] [gd_scene load_steps=4 format=3 uid="uid://d3epy8w15qmjm"]
[ext_resource type="PackedScene" uid="uid://dwsn0lf1e3578" path="res://game/entities/ships/enemies/abstract_enemy_ship.tscn" id="1_wvvpj"] [ext_resource type="PackedScene" uid="uid://dwsn0lf1e3578" path="res://game/entities/ships/enemies/abstract_enemy_ship.tscn" id="1_wvvpj"]
[ext_resource type="Script" uid="uid://cxomr1oojcrcl" path="res://game/entities/ships/enemies/heavy/heavy_enemy_ship.gd" id="2_3umer"] [ext_resource type="Script" uid="uid://cxomr1oojcrcl" path="res://game/entities/ships/enemies/heavy/heavy_enemy_ship.gd" id="2_3umer"]
[ext_resource type="Texture2D" uid="uid://5cgq8o5oqunq" path="res://images/ships/enemies/heavy.png" id="3_xqe8d"]
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_cuapu"]
size = Vector2(64, 48)
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_cuapu"]
radius = 23.0
height = 62.0
[node name="HeavyEnemyShip" instance=ExtResource("1_wvvpj")] [node name="HeavyEnemyShip" instance=ExtResource("1_wvvpj")]
script = ExtResource("2_3umer") script = ExtResource("2_3umer")
@@ -18,11 +12,10 @@ max_speed = 60
mass = 600 mass = 600
[node name="Sprite2D" parent="." index="0"] [node name="Sprite2D" parent="." index="0"]
texture = SubResource("PlaceholderTexture2D_cuapu") texture = ExtResource("3_xqe8d")
[node name="CollisionShape2D" parent="." index="1"] [node name="CollisionPolygon2D" parent="." index="1"]
rotation = 1.5707964 polygon = PackedVector2Array(-31, 2, -31, -2, -17, -19, -11, -22, 8, -23, 30, -23, 30, 23, 8, 23, -11, 22, -17, 19)
shape = SubResource("CapsuleShape2D_cuapu")
[node name="Health" parent="." index="2"] [node name="Health" parent="." index="2"]
max_hull = 200 max_hull = 200
@@ -35,9 +28,10 @@ offset_bottom = 30.0
rect = Rect2(-29, -21, 58, 42) rect = Rect2(-29, -21, 58, 42)
[node name="First" type="Node2D" parent="WeaponSlots" index="0"] [node name="First" type="Node2D" parent="WeaponSlots" index="0"]
position = Vector2(0, -13) position = Vector2(-8, 0)
[node name="Second" type="Node2D" parent="WeaponSlots" index="1"] [node name="Second" type="Node2D" parent="WeaponSlots" index="1"]
position = Vector2(8, -16)
[node name="Third" type="Node2D" parent="WeaponSlots" index="2"] [node name="Third" type="Node2D" parent="WeaponSlots" index="2"]
position = Vector2(0, 13) position = Vector2(8, 16)
@@ -1,14 +1,8 @@
[gd_scene load_steps=5 format=3 uid="uid://cye5ndbh0ht7w"] [gd_scene load_steps=4 format=3 uid="uid://cye5ndbh0ht7w"]
[ext_resource type="PackedScene" uid="uid://dwsn0lf1e3578" path="res://game/entities/ships/enemies/abstract_enemy_ship.tscn" id="1_16owb"] [ext_resource type="PackedScene" uid="uid://dwsn0lf1e3578" path="res://game/entities/ships/enemies/abstract_enemy_ship.tscn" id="1_16owb"]
[ext_resource type="Script" uid="uid://dcpqrdvp4nk82" path="res://game/entities/ships/enemies/medium/medium_enemy_ship.gd" id="2_dgwiy"] [ext_resource type="Script" uid="uid://dcpqrdvp4nk82" path="res://game/entities/ships/enemies/medium/medium_enemy_ship.gd" id="2_dgwiy"]
[ext_resource type="Texture2D" uid="uid://dkwvm246s0wnd" path="res://images/ships/enemies/medium.png" id="3_d2xji"]
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_4jmkv"]
size = Vector2(32, 48)
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_4jmkv"]
radius = 15.0
height = 46.0
[node name="MediumEnemyShip" instance=ExtResource("1_16owb")] [node name="MediumEnemyShip" instance=ExtResource("1_16owb")]
script = ExtResource("2_dgwiy") script = ExtResource("2_dgwiy")
@@ -18,10 +12,10 @@ max_speed = 92
mass = 250 mass = 250
[node name="Sprite2D" parent="." index="0"] [node name="Sprite2D" parent="." index="0"]
texture = SubResource("PlaceholderTexture2D_4jmkv") texture = ExtResource("3_d2xji")
[node name="CollisionShape2D" parent="." index="1"] [node name="CollisionPolygon2D" parent="." index="1"]
shape = SubResource("CapsuleShape2D_4jmkv") polygon = PackedVector2Array(-23, -2, -12, -13, -6, -15, 22, -15, 23, -14, 23, 14, 22, 15, -6, 15, -12, 13, -23, 2)
[node name="Health" parent="." index="2"] [node name="Health" parent="." index="2"]
max_hull = 100 max_hull = 100
@@ -34,7 +28,7 @@ offset_bottom = 30.0
rect = Rect2(-13, -21, 26, 42) rect = Rect2(-13, -21, 26, 42)
[node name="First" type="Node2D" parent="WeaponSlots" index="0"] [node name="First" type="Node2D" parent="WeaponSlots" index="0"]
position = Vector2(0, -10) position = Vector2(4, -8)
[node name="Second" type="Node2D" parent="WeaponSlots" index="1"] [node name="Second" type="Node2D" parent="WeaponSlots" index="1"]
position = Vector2(0, 10) position = Vector2(4, 8)
@@ -1,13 +1,8 @@
[gd_scene load_steps=5 format=3 uid="uid://cbf3kumeoqpba"] [gd_scene load_steps=4 format=3 uid="uid://cbf3kumeoqpba"]
[ext_resource type="PackedScene" uid="uid://dwsn0lf1e3578" path="res://game/entities/ships/enemies/abstract_enemy_ship.tscn" id="1_lt1av"] [ext_resource type="PackedScene" uid="uid://dwsn0lf1e3578" path="res://game/entities/ships/enemies/abstract_enemy_ship.tscn" id="1_lt1av"]
[ext_resource type="Script" uid="uid://btcce3nflycrs" path="res://game/entities/ships/enemies/small/small_enemy_ship.gd" id="2_bw04d"] [ext_resource type="Script" uid="uid://btcce3nflycrs" path="res://game/entities/ships/enemies/small/small_enemy_ship.gd" id="2_bw04d"]
[ext_resource type="Texture2D" uid="uid://5xn5jkmtbn6v" path="res://images/ships/enemies/small.png" id="3_tb2nn"]
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_bw04d"]
size = Vector2(32, 16)
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_lopve"]
radius = 7.0
[node name="SmallEnemyShip" instance=ExtResource("1_lt1av")] [node name="SmallEnemyShip" instance=ExtResource("1_lt1av")]
script = ExtResource("2_bw04d") script = ExtResource("2_bw04d")
@@ -17,11 +12,10 @@ max_speed = 120
mass = 100 mass = 100
[node name="Sprite2D" parent="." index="0"] [node name="Sprite2D" parent="." index="0"]
texture = SubResource("PlaceholderTexture2D_bw04d") texture = ExtResource("3_tb2nn")
[node name="CollisionShape2D" parent="." index="1"] [node name="CollisionPolygon2D" parent="." index="1"]
rotation = 1.5707964 polygon = PackedVector2Array(-3, -7, 12, -7, 15, -4, 15, 4, 12, 7, -3, 7, -15, 1, -15, -1)
shape = SubResource("CapsuleShape2D_lopve")
[node name="Health" parent="." index="2"] [node name="Health" parent="." index="2"]
max_hull = 50 max_hull = 50
@@ -34,4 +28,4 @@ offset_bottom = 14.0
rect = Rect2(-13, -5, 26, 10) rect = Rect2(-13, -5, 26, 10)
[node name="First" type="Node2D" parent="WeaponSlots" index="0"] [node name="First" type="Node2D" parent="WeaponSlots" index="0"]
position = Vector2(6, 0) position = Vector2(5, 0)
+3 -9
View File
@@ -1,14 +1,10 @@
[gd_scene load_steps=6 format=3 uid="uid://br074cqcnul3d"] [gd_scene load_steps=5 format=3 uid="uid://br074cqcnul3d"]
[ext_resource type="PackedScene" uid="uid://jvyagshykmgb" path="res://game/entities/ships/abstract_ship.tscn" id="1_6otxb"] [ext_resource type="PackedScene" uid="uid://jvyagshykmgb" path="res://game/entities/ships/abstract_ship.tscn" id="1_6otxb"]
[ext_resource type="Script" uid="uid://ruxw1n03iq4i" path="res://game/entities/ships/player/player_ship.gd" id="2_625ti"] [ext_resource type="Script" uid="uid://ruxw1n03iq4i" path="res://game/entities/ships/player/player_ship.gd" id="2_625ti"]
[ext_resource type="PackedScene" uid="uid://dh1oj1w5wx4je" path="res://game/controllers/player_controller.tscn" id="3_4mjo1"] [ext_resource type="PackedScene" uid="uid://dh1oj1w5wx4je" path="res://game/controllers/player_controller.tscn" id="3_4mjo1"]
[ext_resource type="Texture2D" uid="uid://y2yfli24n51v" path="res://images/ships/player.png" id="3_uf2n1"] [ext_resource type="Texture2D" uid="uid://y2yfli24n51v" path="res://images/ships/player.png" id="3_uf2n1"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_dj8f1"]
radius = 15.0
height = 46.0
[node name="PlayerShip" groups=["players"] instance=ExtResource("1_6otxb")] [node name="PlayerShip" groups=["players"] instance=ExtResource("1_6otxb")]
collision_layer = 3 collision_layer = 3
collision_mask = 5 collision_mask = 5
@@ -17,14 +13,12 @@ acceleration = 92
deceleration = 46 deceleration = 46
max_speed = 92 max_speed = 92
mass = 250 mass = 250
weapon_rotation = null
[node name="Sprite2D" parent="." index="0"] [node name="Sprite2D" parent="." index="0"]
texture = ExtResource("3_uf2n1") texture = ExtResource("3_uf2n1")
[node name="CollisionShape2D" parent="." index="1"] [node name="CollisionPolygon2D" parent="." index="1"]
rotation = 1.5707964 polygon = PackedVector2Array(-23, -10, -17, -14, -3, -15, 21, -13, 22, -12, 22, 12, 21, 13, -3, 15, -17, 14, -23, 10)
shape = SubResource("CapsuleShape2D_dj8f1")
[node name="Health" parent="." index="2"] [node name="Health" parent="." index="2"]
max_hull = 1000 max_hull = 1000
Binary file not shown.
+40
View File
@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://5cgq8o5oqunq"
path="res://.godot/imported/heavy.png-b0175c145ba80943e42d134c15fc0c59.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://images/ships/enemies/heavy.png"
dest_files=["res://.godot/imported/heavy.png-b0175c145ba80943e42d134c15fc0c59.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.
+40
View File
@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dkwvm246s0wnd"
path="res://.godot/imported/medium.png-d837bd9638a38b7f12041eca8ac1c7de.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://images/ships/enemies/medium.png"
dest_files=["res://.godot/imported/medium.png-d837bd9638a38b7f12041eca8ac1c7de.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Binary file not shown.
+40
View File
@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://5xn5jkmtbn6v"
path="res://.godot/imported/small.png-db1d308abce12a143e21fc9997c962d0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://images/ships/enemies/small.png"
dest_files=["res://.godot/imported/small.png-db1d308abce12a143e21fc9997c962d0.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.