Added CannonWeapon textures
This commit is contained in:
@@ -5,4 +5,4 @@ extends AbstractShip
|
||||
func _ready() -> void:
|
||||
super._ready()
|
||||
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
|
||||
deceleration = 18
|
||||
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"]
|
||||
texture = SubResource("PlaceholderTexture2D_cuapu")
|
||||
|
||||
@@ -5,4 +5,4 @@ extends AbstractShip
|
||||
func _ready() -> void:
|
||||
super._ready()
|
||||
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")
|
||||
|
||||
[node name="Health" parent="." index="2"]
|
||||
max_shield = 1000
|
||||
max_armor = 1000
|
||||
max_hull = 1000
|
||||
|
||||
[node name="HeathBar" parent="." index="3"]
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_4b2nh"]
|
||||
|
||||
[node name="AbstrastProjectile" type="Area2D"]
|
||||
z_index = 1
|
||||
script = ExtResource("1_4b2nh")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
|
||||
@@ -12,31 +12,35 @@ enum Belonging { PLAYER, ENEMY }
|
||||
@export var reloaders : Array[AbstractReloader]
|
||||
|
||||
|
||||
var belonging: Belonging
|
||||
const PREFIXES := {
|
||||
Belonging.PLAYER: "player_",
|
||||
Belonging.ENEMY: "enemy_",
|
||||
}
|
||||
|
||||
|
||||
var _reloaders : Array[AbstractReloader]
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
for reloader in reloaders:
|
||||
_reloaders.append(reloader.duplicate())
|
||||
var _belonging: Belonging
|
||||
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
for reloader in _reloaders:
|
||||
for reloader in reloaders:
|
||||
reloader.process(delta)
|
||||
|
||||
|
||||
func shoot(ship_velocity: Vector2) -> void:
|
||||
if not _can_shoot(): return
|
||||
func set_belonging(belonging: Belonging) -> void:
|
||||
_belonging = belonging
|
||||
|
||||
|
||||
func shoot(ship_velocity: Vector2) -> bool:
|
||||
if not _can_shoot(): return false
|
||||
|
||||
for i in range(bullet_per_shot):
|
||||
var projectile := _create_projectile(ship_velocity)
|
||||
get_tree().current_scene.add_child(projectile)
|
||||
|
||||
for reloader in _reloaders:
|
||||
for reloader in reloaders:
|
||||
reloader.shoot()
|
||||
|
||||
return true
|
||||
|
||||
|
||||
func _create_projectile(ship_velocity: Vector2) -> Node:
|
||||
@@ -44,7 +48,7 @@ func _create_projectile(ship_velocity: Vector2) -> Node:
|
||||
projectile.global_position = global_position
|
||||
projectile.ship_velocity = ship_velocity
|
||||
|
||||
match belonging:
|
||||
match _belonging:
|
||||
Belonging.PLAYER:
|
||||
projectile.direction = Vector2.RIGHT
|
||||
projectile.collide_enemies = true
|
||||
@@ -61,12 +65,12 @@ func _create_projectile(ship_velocity: Vector2) -> Node:
|
||||
|
||||
|
||||
func reload() -> void:
|
||||
for reloader in _reloaders:
|
||||
for reloader in reloaders:
|
||||
reloader.reload()
|
||||
|
||||
|
||||
func _can_shoot() -> bool:
|
||||
for reloader in _reloaders:
|
||||
for reloader in reloaders:
|
||||
if not reloader.can_shoot():
|
||||
return false
|
||||
return true
|
||||
|
||||
@@ -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"]
|
||||
|
||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_dra6h"]
|
||||
size = Vector2(10, 7)
|
||||
|
||||
[node name="AbstractWeapon" type="Node2D"]
|
||||
z_index = 2
|
||||
script = ExtResource("1_x30ps")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = SubResource("PlaceholderTexture2D_dra6h")
|
||||
|
||||
@@ -1 +1,82 @@
|
||||
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)
|
||||
|
||||
@@ -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://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://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="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"]
|
||||
script = ExtResource("4_bv8g1")
|
||||
firerate = 50
|
||||
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")]
|
||||
script = ExtResource("2_ew5um")
|
||||
sector_angle = 1
|
||||
Projectile = ExtResource("2_2bjeu")
|
||||
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="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
|
||||
metadata/_custom_type_script = "uid://d2gfhnlbqxsoq"
|
||||
|
||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_dra6h"]
|
||||
size = Vector2(10, 7)
|
||||
|
||||
[node name="GatlingWeapon" instance=ExtResource("1_gblx7")]
|
||||
script = ExtResource("1_kg6du")
|
||||
sector_angle = 5
|
||||
Projectile = ExtResource("2_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://cmni0xrbbfcy5" path="res://game/entities/weapons/laser/laser_projectile.tscn" id="2_fecho"]
|
||||
@@ -19,8 +19,14 @@ heat_capacity = 1000
|
||||
cooling_down_rate = 2500
|
||||
metadata/_custom_type_script = "uid://dxk56xdihfw4m"
|
||||
|
||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_dra6h"]
|
||||
size = Vector2(10, 7)
|
||||
|
||||
[node name="LaserWeapon" instance=ExtResource("1_pki4x")]
|
||||
script = ExtResource("2_lbdvb")
|
||||
bullet_per_shot = 2
|
||||
Projectile = ExtResource("2_fecho")
|
||||
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="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
|
||||
metadata/_custom_type_script = "uid://b255rb32vc6co"
|
||||
|
||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_dra6h"]
|
||||
size = Vector2(10, 7)
|
||||
|
||||
[node name="LauncherWeapon" instance=ExtResource("1_sk5u1")]
|
||||
script = ExtResource("2_mxjpe")
|
||||
sector_angle = 5
|
||||
Projectile = ExtResource("3_fsoo2")
|
||||
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://4mkklqt1g14f" path="res://game/entities/weapons/minelayer/minelayer_projectile.tscn" id="2_7y446"]
|
||||
@@ -11,8 +11,14 @@ script = ExtResource("4_fbmxv")
|
||||
firerate = 40
|
||||
metadata/_custom_type_script = "uid://b255rb32vc6co"
|
||||
|
||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_dra6h"]
|
||||
size = Vector2(10, 7)
|
||||
|
||||
[node name="MinelayerWeapon" instance=ExtResource("1_12l3k")]
|
||||
script = ExtResource("2_mmhtn")
|
||||
sector_angle = 10
|
||||
Projectile = ExtResource("2_7y446")
|
||||
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="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
|
||||
metadata/_custom_type_script = "uid://dxk56xdihfw4m"
|
||||
|
||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_dra6h"]
|
||||
size = Vector2(10, 7)
|
||||
|
||||
[node name="PlasmaWeapon" instance=ExtResource("1_pkk8e")]
|
||||
script = ExtResource("2_fnsb7")
|
||||
sector_angle = 2
|
||||
Projectile = ExtResource("2_yluvp")
|
||||
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="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
|
||||
metadata/_custom_type_script = "uid://d2gfhnlbqxsoq"
|
||||
|
||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_dra6h"]
|
||||
size = Vector2(10, 7)
|
||||
|
||||
[node name="RailgunWeapon" instance=ExtResource("1_0nxvu")]
|
||||
script = ExtResource("1_5nhwg")
|
||||
Projectile = ExtResource("2_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="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
|
||||
metadata/_custom_type_script = "uid://d2gfhnlbqxsoq"
|
||||
|
||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_dra6h"]
|
||||
size = Vector2(10, 7)
|
||||
|
||||
[node name="ShrapnelWeapon" instance=ExtResource("1_xk300")]
|
||||
script = ExtResource("2_1bd18")
|
||||
bullet_per_shot = 20
|
||||
sector_angle = 30
|
||||
Projectile = ExtResource("2_xvd4y")
|
||||
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:
|
||||
damage = damage.duplicate()
|
||||
super._ready()
|
||||
_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"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_1121u"]
|
||||
resource_local_to_scene = true
|
||||
script = ExtResource("3_l65ib")
|
||||
value = 45
|
||||
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://bi64687wtxi4d" path="res://game/entities/weapons/tesla/tesla_projectile.tscn" id="2_1rrdy"]
|
||||
@@ -19,8 +19,14 @@ heat_capacity = 1000
|
||||
cooling_down_rate = 2500
|
||||
metadata/_custom_type_script = "uid://dxk56xdihfw4m"
|
||||
|
||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_dra6h"]
|
||||
size = Vector2(10, 7)
|
||||
|
||||
[node name="TeslaWeapon" instance=ExtResource("1_rpud7")]
|
||||
script = ExtResource("2_08si3")
|
||||
sector_angle = 10
|
||||
Projectile = ExtResource("2_1rrdy")
|
||||
reloaders = Array[ExtResource("3_08si3")]([SubResource("Resource_1rrdy"), SubResource("Resource_08si3")])
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="." index="0"]
|
||||
texture = SubResource("PlaceholderTexture2D_dra6h")
|
||||
|
||||
@@ -3,6 +3,10 @@ extends Resource
|
||||
class_name AbstractReloader
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
resource_local_to_scene = true
|
||||
|
||||
|
||||
@abstract
|
||||
func process(delta: float) -> void
|
||||
|
||||
|
||||
Reference in New Issue
Block a user