Added CannonWeapon textures

This commit is contained in:
2025-11-19 15:32:03 +03:00
parent 721d38e9d1
commit 77b03e4b73
25 changed files with 443 additions and 36 deletions
@@ -5,4 +5,4 @@ extends AbstractShip
func _ready() -> void: func _ready() -> void:
super._ready() super._ready()
for weapon in _weapons: for weapon in _weapons:
weapon.belonging = AbstractWeapon.Belonging.ENEMY weapon.set_belonging(AbstractWeapon.Belonging.ENEMY)
@@ -15,7 +15,7 @@ script = ExtResource("2_3umer")
acceleration = 30 acceleration = 30
deceleration = 18 deceleration = 18
max_speed = 60 max_speed = 60
weapon_positions = Array[Vector2]([Vector2(0, 12), Vector2(0, 0), Vector2(0, -12)]) weapon_positions = Array[Vector2]([Vector2(0, 16), Vector2(0, 0), Vector2(0, -16)])
[node name="Sprite2D" parent="." index="0"] [node name="Sprite2D" parent="." index="0"]
texture = SubResource("PlaceholderTexture2D_cuapu") texture = SubResource("PlaceholderTexture2D_cuapu")
+1 -1
View File
@@ -5,4 +5,4 @@ extends AbstractShip
func _ready() -> void: func _ready() -> void:
super._ready() super._ready()
for weapon in _weapons: for weapon in _weapons:
weapon.belonging = AbstractWeapon.Belonging.PLAYER weapon.set_belonging(AbstractWeapon.Belonging.PLAYER)
@@ -27,8 +27,6 @@ rotation = 1.5707964
shape = SubResource("CapsuleShape2D_dj8f1") shape = SubResource("CapsuleShape2D_dj8f1")
[node name="Health" parent="." index="2"] [node name="Health" parent="." index="2"]
max_shield = 1000
max_armor = 1000
max_hull = 1000 max_hull = 1000
[node name="HeathBar" parent="." index="3"] [node name="HeathBar" parent="." index="3"]
@@ -5,6 +5,7 @@
[sub_resource type="CircleShape2D" id="CircleShape2D_4b2nh"] [sub_resource type="CircleShape2D" id="CircleShape2D_4b2nh"]
[node name="AbstrastProjectile" type="Area2D"] [node name="AbstrastProjectile" type="Area2D"]
z_index = 1
script = ExtResource("1_4b2nh") script = ExtResource("1_4b2nh")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."] [node name="CollisionShape2D" type="CollisionShape2D" parent="."]
+18 -14
View File
@@ -12,31 +12,35 @@ enum Belonging { PLAYER, ENEMY }
@export var reloaders : Array[AbstractReloader] @export var reloaders : Array[AbstractReloader]
var belonging: Belonging const PREFIXES := {
Belonging.PLAYER: "player_",
Belonging.ENEMY: "enemy_",
}
var _reloaders : Array[AbstractReloader] var _belonging: Belonging
func _ready() -> void:
for reloader in reloaders:
_reloaders.append(reloader.duplicate())
func _physics_process(delta: float) -> void: func _physics_process(delta: float) -> void:
for reloader in _reloaders: for reloader in reloaders:
reloader.process(delta) reloader.process(delta)
func shoot(ship_velocity: Vector2) -> void: func set_belonging(belonging: Belonging) -> void:
if not _can_shoot(): return _belonging = belonging
func shoot(ship_velocity: Vector2) -> bool:
if not _can_shoot(): return false
for i in range(bullet_per_shot): for i in range(bullet_per_shot):
var projectile := _create_projectile(ship_velocity) var projectile := _create_projectile(ship_velocity)
get_tree().current_scene.add_child(projectile) get_tree().current_scene.add_child(projectile)
for reloader in _reloaders: for reloader in reloaders:
reloader.shoot() reloader.shoot()
return true
func _create_projectile(ship_velocity: Vector2) -> Node: func _create_projectile(ship_velocity: Vector2) -> Node:
@@ -44,7 +48,7 @@ func _create_projectile(ship_velocity: Vector2) -> Node:
projectile.global_position = global_position projectile.global_position = global_position
projectile.ship_velocity = ship_velocity projectile.ship_velocity = ship_velocity
match belonging: match _belonging:
Belonging.PLAYER: Belonging.PLAYER:
projectile.direction = Vector2.RIGHT projectile.direction = Vector2.RIGHT
projectile.collide_enemies = true projectile.collide_enemies = true
@@ -61,12 +65,12 @@ func _create_projectile(ship_velocity: Vector2) -> Node:
func reload() -> void: func reload() -> void:
for reloader in _reloaders: for reloader in reloaders:
reloader.reload() reloader.reload()
func _can_shoot() -> bool: func _can_shoot() -> bool:
for reloader in _reloaders: for reloader in reloaders:
if not reloader.can_shoot(): if not reloader.can_shoot():
return false return false
return true return true
+2 -7
View File
@@ -1,12 +1,7 @@
[gd_scene load_steps=3 format=3 uid="uid://1o2ta17yc5bp"] [gd_scene load_steps=2 format=3 uid="uid://1o2ta17yc5bp"]
[ext_resource type="Script" uid="uid://dpqxs8hlql2o0" path="res://game/entities/weapons/abstract_weapon.gd" id="1_x30ps"] [ext_resource type="Script" uid="uid://dpqxs8hlql2o0" path="res://game/entities/weapons/abstract_weapon.gd" id="1_x30ps"]
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_dra6h"]
size = Vector2(10, 7)
[node name="AbstractWeapon" type="Node2D"] [node name="AbstractWeapon" type="Node2D"]
z_index = 2
script = ExtResource("1_x30ps") script = ExtResource("1_x30ps")
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = SubResource("PlaceholderTexture2D_dra6h")
@@ -1 +1,82 @@
extends AbstractWeapon extends AbstractWeapon
const SHOT_POSTFIX = "shot"
const IDLE_POSTFIX = "idle"
@onready var sprite : AnimatedSprite2D = $AnimatedSprite2D
@onready var front_particles : GPUParticles2D = $ShotParticles/Front
@onready var left_particles : GPUParticles2D = $ShotParticles/Left
@onready var right_particles : GPUParticles2D = $ShotParticles/Right
@onready var shell_particles : GPUParticles2D = $ShellParticles
func set_belonging(belonging: Belonging) -> void:
super.set_belonging(belonging)
_init_particles()
sprite.play(PREFIXES[_belonging] + IDLE_POSTFIX)
func _init_particles() -> void:
const FRONT_OFFSET_X = 12
const LEFT_OFFSET_X = 7
const LEFT_OFFSET_Y = 5
const SHELL_OFFSET_X = -10
const SHELL_OFFSET_Y = 2
match _belonging:
Belonging.PLAYER:
front_particles.process_material.emission_shape_offset.x = FRONT_OFFSET_X
front_particles.process_material.direction = Vector3.RIGHT
left_particles.process_material.emission_shape_offset.x = LEFT_OFFSET_X
left_particles.process_material.emission_shape_offset.y = -LEFT_OFFSET_Y
left_particles.process_material.direction = Vector3.DOWN + Vector3.LEFT
right_particles.process_material.emission_shape_offset.x = LEFT_OFFSET_X
right_particles.process_material.emission_shape_offset.y = LEFT_OFFSET_Y
right_particles.process_material.direction = Vector3.UP + Vector3.LEFT
shell_particles.process_material.emission_shape_offset.x = SHELL_OFFSET_X
shell_particles.process_material.emission_shape_offset.y = SHELL_OFFSET_Y
shell_particles.process_material.direction = Vector3.UP
Belonging.ENEMY:
front_particles.process_material.emission_shape_offset.x = -FRONT_OFFSET_X
front_particles.process_material.direction = Vector3.LEFT
left_particles.process_material.emission_shape_offset.x = -LEFT_OFFSET_X
left_particles.process_material.emission_shape_offset.y = -LEFT_OFFSET_Y
left_particles.process_material.direction = Vector3.DOWN + Vector3.RIGHT
right_particles.process_material.emission_shape_offset.x = -LEFT_OFFSET_X
right_particles.process_material.emission_shape_offset.y = LEFT_OFFSET_Y
right_particles.process_material.direction = Vector3.UP + Vector3.RIGHT
shell_particles.process_material.emission_shape_offset.x = -SHELL_OFFSET_X
shell_particles.process_material.emission_shape_offset.y = -SHELL_OFFSET_Y
shell_particles.process_material.direction = Vector3.DOWN
func shoot(ship_velocity: Vector2) -> bool:
var is_shot := super.shoot(ship_velocity)
if is_shot:
sprite.play(PREFIXES[_belonging] + SHOT_POSTFIX)
_restart_particles()
return is_shot
func _restart_particles() -> void:
front_particles.restart()
left_particles.restart()
right_particles.restart()
shell_particles.restart()
func _on_animated_sprite_2d_animation_finished() -> void:
sprite.play(PREFIXES[_belonging] + IDLE_POSTFIX)
+190 -1
View File
@@ -1,18 +1,207 @@
[gd_scene load_steps=7 format=3 uid="uid://bccaoirwdkp7n"] [gd_scene load_steps=27 format=3 uid="uid://bccaoirwdkp7n"]
[ext_resource type="PackedScene" uid="uid://1o2ta17yc5bp" path="res://game/entities/weapons/abstract_weapon.tscn" id="1_xnbws"] [ext_resource type="PackedScene" uid="uid://1o2ta17yc5bp" path="res://game/entities/weapons/abstract_weapon.tscn" id="1_xnbws"]
[ext_resource type="PackedScene" uid="uid://cgi7wd84kjnyw" path="res://game/entities/weapons/cannon/cannon_projectile.tscn" id="2_2bjeu"] [ext_resource type="PackedScene" uid="uid://cgi7wd84kjnyw" path="res://game/entities/weapons/cannon/cannon_projectile.tscn" id="2_2bjeu"]
[ext_resource type="Script" uid="uid://db24dm76b1am7" path="res://game/entities/weapons/cannon/cannon_weapon.gd" id="2_ew5um"] [ext_resource type="Script" uid="uid://db24dm76b1am7" path="res://game/entities/weapons/cannon/cannon_weapon.gd" id="2_ew5um"]
[ext_resource type="Script" uid="uid://ccpriilfr3kme" path="res://game/reloaders/abstract_reloader.gd" id="3_7e2aj"] [ext_resource type="Script" uid="uid://ccpriilfr3kme" path="res://game/reloaders/abstract_reloader.gd" id="3_7e2aj"]
[ext_resource type="Script" uid="uid://b255rb32vc6co" path="res://game/reloaders/firerate_reloader.gd" id="4_bv8g1"] [ext_resource type="Script" uid="uid://b255rb32vc6co" path="res://game/reloaders/firerate_reloader.gd" id="4_bv8g1"]
[ext_resource type="Texture2D" uid="uid://6hh66k8s4a1e" path="res://images/weapons.png" id="6_jfd4t"]
[ext_resource type="Texture2D" uid="uid://3w0itm7k5fxq" path="res://images/particles.png" id="7_i0ica"]
[sub_resource type="Resource" id="Resource_7e2aj"] [sub_resource type="Resource" id="Resource_7e2aj"]
script = ExtResource("4_bv8g1") script = ExtResource("4_bv8g1")
firerate = 50 firerate = 50
metadata/_custom_type_script = "uid://b255rb32vc6co" metadata/_custom_type_script = "uid://b255rb32vc6co"
[sub_resource type="Gradient" id="Gradient_jfd4t"]
colors = PackedColorArray(1, 0.8039216, 0.45882353, 1, 0.9372549, 0.49019608, 0.34117648, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_i0ica"]
gradient = SubResource("Gradient_jfd4t")
width = 2
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_377p4"]
resource_local_to_scene = true
lifetime_randomness = 0.4
particle_flag_disable_z = true
inherit_velocity_ratio = 0.2
spread = 30.0
initial_velocity_min = 10.0
initial_velocity_max = 20.0
gravity = Vector3(0, 0, 0)
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_i0ica"]
resource_local_to_scene = true
lifetime_randomness = 0.1
particle_flag_disable_z = true
inherit_velocity_ratio = 0.2
spread = 5.0
initial_velocity_min = 10.0
initial_velocity_max = 20.0
gravity = Vector3(0, 0, 0)
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_jfd4t"]
resource_local_to_scene = true
lifetime_randomness = 0.1
particle_flag_disable_z = true
inherit_velocity_ratio = 0.2
spread = 5.0
initial_velocity_min = 10.0
initial_velocity_max = 20.0
gravity = Vector3(0, 0, 0)
[sub_resource type="AtlasTexture" id="AtlasTexture_jfd4t"]
atlas = ExtResource("6_jfd4t")
region = Rect2(0, 160, 32, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_i0ica"]
atlas = ExtResource("6_jfd4t")
region = Rect2(32, 160, 32, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_377p4"]
atlas = ExtResource("6_jfd4t")
region = Rect2(64, 160, 32, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_nrbut"]
atlas = ExtResource("6_jfd4t")
region = Rect2(96, 160, 32, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_mk6k8"]
atlas = ExtResource("6_jfd4t")
region = Rect2(128, 160, 32, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_fxfcx"]
atlas = ExtResource("6_jfd4t")
region = Rect2(0, 144, 32, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_dvc0n"]
atlas = ExtResource("6_jfd4t")
region = Rect2(32, 144, 32, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_caj01"]
atlas = ExtResource("6_jfd4t")
region = Rect2(64, 144, 32, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_e28g8"]
atlas = ExtResource("6_jfd4t")
region = Rect2(96, 144, 32, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_f7kmj"]
atlas = ExtResource("6_jfd4t")
region = Rect2(128, 144, 32, 16)
[sub_resource type="SpriteFrames" id="SpriteFrames_kdf62"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_jfd4t")
}],
"loop": true,
"name": &"enemy_idle",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_i0ica")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_377p4")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_nrbut")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_mk6k8")
}],
"loop": false,
"name": &"enemy_shot",
"speed": 10.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_fxfcx")
}],
"loop": true,
"name": &"player_idle",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_dvc0n")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_caj01")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_e28g8")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_f7kmj")
}],
"loop": false,
"name": &"player_shot",
"speed": 10.0
}]
[sub_resource type="AtlasTexture" id="AtlasTexture_h76ev"]
atlas = ExtResource("7_i0ica")
region = Rect2(0, 0, 16, 16)
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_nrbut"]
resource_local_to_scene = true
lifetime_randomness = 0.5
particle_flag_disable_z = true
inherit_velocity_ratio = 1.0
spread = 15.0
initial_velocity_min = 5.0
initial_velocity_max = 15.0
gravity = Vector3(0, 0, 0)
[node name="CannonWeapon" instance=ExtResource("1_xnbws")] [node name="CannonWeapon" instance=ExtResource("1_xnbws")]
script = ExtResource("2_ew5um") script = ExtResource("2_ew5um")
sector_angle = 1 sector_angle = 1
Projectile = ExtResource("2_2bjeu") Projectile = ExtResource("2_2bjeu")
reloaders = Array[ExtResource("3_7e2aj")]([SubResource("Resource_7e2aj")]) reloaders = Array[ExtResource("3_7e2aj")]([SubResource("Resource_7e2aj")])
[node name="ShotParticles" type="Node2D" parent="." index="0"]
[node name="Front" type="GPUParticles2D" parent="ShotParticles" index="0"]
emitting = false
amount = 32
texture = SubResource("GradientTexture1D_i0ica")
lifetime = 0.5
one_shot = true
preprocess = 0.1
fixed_fps = 10
process_material = SubResource("ParticleProcessMaterial_377p4")
[node name="Left" type="GPUParticles2D" parent="ShotParticles" index="1"]
emitting = false
texture = SubResource("GradientTexture1D_i0ica")
lifetime = 0.2
one_shot = true
fixed_fps = 10
process_material = SubResource("ParticleProcessMaterial_i0ica")
[node name="Right" type="GPUParticles2D" parent="ShotParticles" index="2"]
emitting = false
texture = SubResource("GradientTexture1D_i0ica")
lifetime = 0.2
one_shot = true
fixed_fps = 10
process_material = SubResource("ParticleProcessMaterial_jfd4t")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." index="1"]
sprite_frames = SubResource("SpriteFrames_kdf62")
animation = &"player_idle"
[node name="ShellParticles" type="GPUParticles2D" parent="." index="2"]
emitting = false
amount = 1
texture = SubResource("AtlasTexture_h76ev")
lifetime = 2.0
one_shot = true
fixed_fps = 10
process_material = SubResource("ParticleProcessMaterial_nrbut")
[connection signal="animation_finished" from="AnimatedSprite2D" to="." method="_on_animated_sprite_2d_animation_finished"]
@@ -1,4 +1,4 @@
[gd_scene load_steps=9 format=3 uid="uid://c4mlppn5i55bp"] [gd_scene load_steps=10 format=3 uid="uid://c4mlppn5i55bp"]
[ext_resource type="PackedScene" uid="uid://1o2ta17yc5bp" path="res://game/entities/weapons/abstract_weapon.tscn" id="1_gblx7"] [ext_resource type="PackedScene" uid="uid://1o2ta17yc5bp" path="res://game/entities/weapons/abstract_weapon.tscn" id="1_gblx7"]
[ext_resource type="Script" uid="uid://c1bsvmj7xhnxe" path="res://game/entities/weapons/gatling/gatling_weapon.gd" id="1_kg6du"] [ext_resource type="Script" uid="uid://c1bsvmj7xhnxe" path="res://game/entities/weapons/gatling/gatling_weapon.gd" id="1_kg6du"]
@@ -19,8 +19,14 @@ magazine_size = 150
reload_time = 2 reload_time = 2
metadata/_custom_type_script = "uid://d2gfhnlbqxsoq" metadata/_custom_type_script = "uid://d2gfhnlbqxsoq"
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_dra6h"]
size = Vector2(10, 7)
[node name="GatlingWeapon" instance=ExtResource("1_gblx7")] [node name="GatlingWeapon" instance=ExtResource("1_gblx7")]
script = ExtResource("1_kg6du") script = ExtResource("1_kg6du")
sector_angle = 5 sector_angle = 5
Projectile = ExtResource("2_ylc0n") Projectile = ExtResource("2_ylc0n")
reloaders = Array[ExtResource("3_uucc4")]([SubResource("Resource_kg6du"), SubResource("Resource_ylc0n")]) reloaders = Array[ExtResource("3_uucc4")]([SubResource("Resource_kg6du"), SubResource("Resource_ylc0n")])
[node name="Sprite2D" type="Sprite2D" parent="." index="0"]
texture = SubResource("PlaceholderTexture2D_dra6h")
@@ -1,4 +1,4 @@
[gd_scene load_steps=9 format=3 uid="uid://def1alrel4ioo"] [gd_scene load_steps=10 format=3 uid="uid://def1alrel4ioo"]
[ext_resource type="PackedScene" uid="uid://1o2ta17yc5bp" path="res://game/entities/weapons/abstract_weapon.tscn" id="1_pki4x"] [ext_resource type="PackedScene" uid="uid://1o2ta17yc5bp" path="res://game/entities/weapons/abstract_weapon.tscn" id="1_pki4x"]
[ext_resource type="PackedScene" uid="uid://cmni0xrbbfcy5" path="res://game/entities/weapons/laser/laser_projectile.tscn" id="2_fecho"] [ext_resource type="PackedScene" uid="uid://cmni0xrbbfcy5" path="res://game/entities/weapons/laser/laser_projectile.tscn" id="2_fecho"]
@@ -19,8 +19,14 @@ heat_capacity = 1000
cooling_down_rate = 2500 cooling_down_rate = 2500
metadata/_custom_type_script = "uid://dxk56xdihfw4m" metadata/_custom_type_script = "uid://dxk56xdihfw4m"
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_dra6h"]
size = Vector2(10, 7)
[node name="LaserWeapon" instance=ExtResource("1_pki4x")] [node name="LaserWeapon" instance=ExtResource("1_pki4x")]
script = ExtResource("2_lbdvb") script = ExtResource("2_lbdvb")
bullet_per_shot = 2 bullet_per_shot = 2
Projectile = ExtResource("2_fecho") Projectile = ExtResource("2_fecho")
reloaders = Array[ExtResource("3_c1wcw")]([SubResource("Resource_fecho"), SubResource("Resource_c1wcw")]) reloaders = Array[ExtResource("3_c1wcw")]([SubResource("Resource_fecho"), SubResource("Resource_c1wcw")])
[node name="Sprite2D" type="Sprite2D" parent="." index="0"]
texture = SubResource("PlaceholderTexture2D_dra6h")
@@ -1,4 +1,4 @@
[gd_scene load_steps=7 format=3 uid="uid://c3l866fdqt7pf"] [gd_scene load_steps=8 format=3 uid="uid://c3l866fdqt7pf"]
[ext_resource type="PackedScene" uid="uid://1o2ta17yc5bp" path="res://game/entities/weapons/abstract_weapon.tscn" id="1_sk5u1"] [ext_resource type="PackedScene" uid="uid://1o2ta17yc5bp" path="res://game/entities/weapons/abstract_weapon.tscn" id="1_sk5u1"]
[ext_resource type="Script" uid="uid://lauvvj5xhbud" path="res://game/entities/weapons/launcher/launcher_weapon.gd" id="2_mxjpe"] [ext_resource type="Script" uid="uid://lauvvj5xhbud" path="res://game/entities/weapons/launcher/launcher_weapon.gd" id="2_mxjpe"]
@@ -11,8 +11,14 @@ script = ExtResource("4_fsoo2")
firerate = 120 firerate = 120
metadata/_custom_type_script = "uid://b255rb32vc6co" metadata/_custom_type_script = "uid://b255rb32vc6co"
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_dra6h"]
size = Vector2(10, 7)
[node name="LauncherWeapon" instance=ExtResource("1_sk5u1")] [node name="LauncherWeapon" instance=ExtResource("1_sk5u1")]
script = ExtResource("2_mxjpe") script = ExtResource("2_mxjpe")
sector_angle = 5 sector_angle = 5
Projectile = ExtResource("3_fsoo2") Projectile = ExtResource("3_fsoo2")
reloaders = Array[ExtResource("3_1rkeb")]([SubResource("Resource_8arbu")]) reloaders = Array[ExtResource("3_1rkeb")]([SubResource("Resource_8arbu")])
[node name="Sprite2D" type="Sprite2D" parent="." index="0"]
texture = SubResource("PlaceholderTexture2D_dra6h")
@@ -1,4 +1,4 @@
[gd_scene load_steps=7 format=3 uid="uid://j3yht6q4ru4e"] [gd_scene load_steps=8 format=3 uid="uid://j3yht6q4ru4e"]
[ext_resource type="PackedScene" uid="uid://1o2ta17yc5bp" path="res://game/entities/weapons/abstract_weapon.tscn" id="1_12l3k"] [ext_resource type="PackedScene" uid="uid://1o2ta17yc5bp" path="res://game/entities/weapons/abstract_weapon.tscn" id="1_12l3k"]
[ext_resource type="PackedScene" uid="uid://4mkklqt1g14f" path="res://game/entities/weapons/minelayer/minelayer_projectile.tscn" id="2_7y446"] [ext_resource type="PackedScene" uid="uid://4mkklqt1g14f" path="res://game/entities/weapons/minelayer/minelayer_projectile.tscn" id="2_7y446"]
@@ -11,8 +11,14 @@ script = ExtResource("4_fbmxv")
firerate = 40 firerate = 40
metadata/_custom_type_script = "uid://b255rb32vc6co" metadata/_custom_type_script = "uid://b255rb32vc6co"
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_dra6h"]
size = Vector2(10, 7)
[node name="MinelayerWeapon" instance=ExtResource("1_12l3k")] [node name="MinelayerWeapon" instance=ExtResource("1_12l3k")]
script = ExtResource("2_mmhtn") script = ExtResource("2_mmhtn")
sector_angle = 10 sector_angle = 10
Projectile = ExtResource("2_7y446") Projectile = ExtResource("2_7y446")
reloaders = Array[ExtResource("3_uotj8")]([SubResource("Resource_uotj8")]) reloaders = Array[ExtResource("3_uotj8")]([SubResource("Resource_uotj8")])
[node name="Sprite2D" type="Sprite2D" parent="." index="0"]
texture = SubResource("PlaceholderTexture2D_dra6h")
@@ -1,4 +1,4 @@
[gd_scene load_steps=9 format=3 uid="uid://cj1jclfterepm"] [gd_scene load_steps=10 format=3 uid="uid://cj1jclfterepm"]
[ext_resource type="PackedScene" uid="uid://1o2ta17yc5bp" path="res://game/entities/weapons/abstract_weapon.tscn" id="1_pkk8e"] [ext_resource type="PackedScene" uid="uid://1o2ta17yc5bp" path="res://game/entities/weapons/abstract_weapon.tscn" id="1_pkk8e"]
[ext_resource type="Script" uid="uid://cu6ck2oqqdem8" path="res://game/entities/weapons/plasma/plasma_weapon.gd" id="2_fnsb7"] [ext_resource type="Script" uid="uid://cu6ck2oqqdem8" path="res://game/entities/weapons/plasma/plasma_weapon.gd" id="2_fnsb7"]
@@ -19,8 +19,14 @@ heat_capacity = 1000
cooling_down_rate = 1000 cooling_down_rate = 1000
metadata/_custom_type_script = "uid://dxk56xdihfw4m" metadata/_custom_type_script = "uid://dxk56xdihfw4m"
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_dra6h"]
size = Vector2(10, 7)
[node name="PlasmaWeapon" instance=ExtResource("1_pkk8e")] [node name="PlasmaWeapon" instance=ExtResource("1_pkk8e")]
script = ExtResource("2_fnsb7") script = ExtResource("2_fnsb7")
sector_angle = 2 sector_angle = 2
Projectile = ExtResource("2_yluvp") Projectile = ExtResource("2_yluvp")
reloaders = Array[ExtResource("3_fnsb7")]([SubResource("Resource_yluvp"), SubResource("Resource_fnsb7")]) reloaders = Array[ExtResource("3_fnsb7")]([SubResource("Resource_yluvp"), SubResource("Resource_fnsb7")])
[node name="Sprite2D" type="Sprite2D" parent="." index="0"]
texture = SubResource("PlaceholderTexture2D_dra6h")
@@ -1,4 +1,4 @@
[gd_scene load_steps=9 format=3 uid="uid://do6h77gmnreho"] [gd_scene load_steps=10 format=3 uid="uid://do6h77gmnreho"]
[ext_resource type="PackedScene" uid="uid://1o2ta17yc5bp" path="res://game/entities/weapons/abstract_weapon.tscn" id="1_0nxvu"] [ext_resource type="PackedScene" uid="uid://1o2ta17yc5bp" path="res://game/entities/weapons/abstract_weapon.tscn" id="1_0nxvu"]
[ext_resource type="Script" uid="uid://drnofu4ium56e" path="res://game/entities/weapons/railgun/railgun_weapon.gd" id="1_5nhwg"] [ext_resource type="Script" uid="uid://drnofu4ium56e" path="res://game/entities/weapons/railgun/railgun_weapon.gd" id="1_5nhwg"]
@@ -18,7 +18,13 @@ magazine_size = 30
reload_time = 7 reload_time = 7
metadata/_custom_type_script = "uid://d2gfhnlbqxsoq" metadata/_custom_type_script = "uid://d2gfhnlbqxsoq"
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_dra6h"]
size = Vector2(10, 7)
[node name="RailgunWeapon" instance=ExtResource("1_0nxvu")] [node name="RailgunWeapon" instance=ExtResource("1_0nxvu")]
script = ExtResource("1_5nhwg") script = ExtResource("1_5nhwg")
Projectile = ExtResource("2_cbsia") Projectile = ExtResource("2_cbsia")
reloaders = Array[ExtResource("3_qxka8")]([SubResource("Resource_5nhwg"), SubResource("Resource_cbsia")]) reloaders = Array[ExtResource("3_qxka8")]([SubResource("Resource_5nhwg"), SubResource("Resource_cbsia")])
[node name="Sprite2D" type="Sprite2D" parent="." index="0"]
texture = SubResource("PlaceholderTexture2D_dra6h")
@@ -1,4 +1,4 @@
[gd_scene load_steps=9 format=3 uid="uid://r7wnk762jbfy"] [gd_scene load_steps=10 format=3 uid="uid://r7wnk762jbfy"]
[ext_resource type="PackedScene" uid="uid://1o2ta17yc5bp" path="res://game/entities/weapons/abstract_weapon.tscn" id="1_xk300"] [ext_resource type="PackedScene" uid="uid://1o2ta17yc5bp" path="res://game/entities/weapons/abstract_weapon.tscn" id="1_xk300"]
[ext_resource type="Script" uid="uid://gxwbsiicuqh5" path="res://game/entities/weapons/shrapnel/shrapnel_weapon.gd" id="2_1bd18"] [ext_resource type="Script" uid="uid://gxwbsiicuqh5" path="res://game/entities/weapons/shrapnel/shrapnel_weapon.gd" id="2_1bd18"]
@@ -18,9 +18,15 @@ magazine_size = 35
reload_time = 5 reload_time = 5
metadata/_custom_type_script = "uid://d2gfhnlbqxsoq" metadata/_custom_type_script = "uid://d2gfhnlbqxsoq"
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_dra6h"]
size = Vector2(10, 7)
[node name="ShrapnelWeapon" instance=ExtResource("1_xk300")] [node name="ShrapnelWeapon" instance=ExtResource("1_xk300")]
script = ExtResource("2_1bd18") script = ExtResource("2_1bd18")
bullet_per_shot = 20 bullet_per_shot = 20
sector_angle = 30 sector_angle = 30
Projectile = ExtResource("2_xvd4y") Projectile = ExtResource("2_xvd4y")
reloaders = Array[ExtResource("3_tyrw7")]([SubResource("Resource_tyrw7"), SubResource("Resource_nfmol")]) reloaders = Array[ExtResource("3_tyrw7")]([SubResource("Resource_tyrw7"), SubResource("Resource_nfmol")])
[node name="Sprite2D" type="Sprite2D" parent="." index="0"]
texture = SubResource("PlaceholderTexture2D_dra6h")
@@ -15,7 +15,6 @@ var _collided_foes : Array[AbstractShip] = []
func _ready() -> void: func _ready() -> void:
damage = damage.duplicate()
super._ready() super._ready()
_start_jink_timer() _start_jink_timer()
@@ -5,6 +5,7 @@
[ext_resource type="Script" uid="uid://c27v705giygv4" path="res://game/health_system/damage/energy_damage.gd" id="3_l65ib"] [ext_resource type="Script" uid="uid://c27v705giygv4" path="res://game/health_system/damage/energy_damage.gd" id="3_l65ib"]
[sub_resource type="Resource" id="Resource_1121u"] [sub_resource type="Resource" id="Resource_1121u"]
resource_local_to_scene = true
script = ExtResource("3_l65ib") script = ExtResource("3_l65ib")
value = 45 value = 45
metadata/_custom_type_script = "uid://c27v705giygv4" metadata/_custom_type_script = "uid://c27v705giygv4"
@@ -1,4 +1,4 @@
[gd_scene load_steps=9 format=3 uid="uid://dyebeblayioji"] [gd_scene load_steps=10 format=3 uid="uid://dyebeblayioji"]
[ext_resource type="PackedScene" uid="uid://1o2ta17yc5bp" path="res://game/entities/weapons/abstract_weapon.tscn" id="1_rpud7"] [ext_resource type="PackedScene" uid="uid://1o2ta17yc5bp" path="res://game/entities/weapons/abstract_weapon.tscn" id="1_rpud7"]
[ext_resource type="PackedScene" uid="uid://bi64687wtxi4d" path="res://game/entities/weapons/tesla/tesla_projectile.tscn" id="2_1rrdy"] [ext_resource type="PackedScene" uid="uid://bi64687wtxi4d" path="res://game/entities/weapons/tesla/tesla_projectile.tscn" id="2_1rrdy"]
@@ -19,8 +19,14 @@ heat_capacity = 1000
cooling_down_rate = 2500 cooling_down_rate = 2500
metadata/_custom_type_script = "uid://dxk56xdihfw4m" metadata/_custom_type_script = "uid://dxk56xdihfw4m"
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_dra6h"]
size = Vector2(10, 7)
[node name="TeslaWeapon" instance=ExtResource("1_rpud7")] [node name="TeslaWeapon" instance=ExtResource("1_rpud7")]
script = ExtResource("2_08si3") script = ExtResource("2_08si3")
sector_angle = 10 sector_angle = 10
Projectile = ExtResource("2_1rrdy") Projectile = ExtResource("2_1rrdy")
reloaders = Array[ExtResource("3_08si3")]([SubResource("Resource_1rrdy"), SubResource("Resource_08si3")]) reloaders = Array[ExtResource("3_08si3")]([SubResource("Resource_1rrdy"), SubResource("Resource_08si3")])
[node name="Sprite2D" type="Sprite2D" parent="." index="0"]
texture = SubResource("PlaceholderTexture2D_dra6h")
+4
View File
@@ -3,6 +3,10 @@ extends Resource
class_name AbstractReloader class_name AbstractReloader
func _init() -> void:
resource_local_to_scene = true
@abstract @abstract
func process(delta: float) -> void func process(delta: float) -> void
BIN
View File
Binary file not shown.
+40
View File
@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://3w0itm7k5fxq"
path="res://.godot/imported/particles.png-86cd4f67c316e2e36289f2646d498449.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://images/particles.png"
dest_files=["res://.godot/imported/particles.png-86cd4f67c316e2e36289f2646d498449.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.
+40
View File
@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://6hh66k8s4a1e"
path="res://.godot/imported/weapons.png-5e31f764c3152a25cc3ecb57f3bdccd0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://images/weapons.png"
dest_files=["res://.godot/imported/weapons.png-5e31f764c3152a25cc3ecb57f3bdccd0.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
+1
View File
@@ -29,6 +29,7 @@ text = "CONTINUE"
[node name="OptionsButton" type="Button" parent="VBoxContainer"] [node name="OptionsButton" type="Button" parent="VBoxContainer"]
layout_mode = 2 layout_mode = 2
mouse_filter = 2
theme = ExtResource("2_vy7sn") theme = ExtResource("2_vy7sn")
text = "OPTIONS" text = "OPTIONS"