Removed reloaders from Cannon, Minelayer and Tesla
This commit is contained in:
@@ -2,9 +2,23 @@ extends AbstractWeapon
|
||||
|
||||
|
||||
@onready var sprite : AnimatedSprite2D = $AnimatedSprite2D
|
||||
@onready var cooldown_timer : Timer = $CooldownTimer
|
||||
|
||||
|
||||
func set_belonging(belonging: Belonging) -> void:
|
||||
super.set_belonging(belonging)
|
||||
|
||||
sprite.play(PREFIXES[_belonging] + IDLE_POSTFIX)
|
||||
|
||||
|
||||
func shoot(ship_velocity: Vector2) -> bool:
|
||||
var is_shot := super.shoot(ship_velocity)
|
||||
if is_shot:
|
||||
_can_shoot = false
|
||||
cooldown_timer.start()
|
||||
|
||||
return is_shot
|
||||
|
||||
|
||||
func _on_cooldown_timer_timeout() -> void:
|
||||
_can_shoot = true
|
||||
|
||||
@@ -1,17 +1,10 @@
|
||||
[gd_scene load_steps=29 format=3 uid="uid://dyebeblayioji"]
|
||||
[gd_scene load_steps=26 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"]
|
||||
[ext_resource type="Script" uid="uid://ctv408wdwvttc" path="res://game/entities/weapons/tesla/tesla_weapon.gd" id="2_08si3"]
|
||||
[ext_resource type="Script" uid="uid://ccpriilfr3kme" path="res://game/reloaders/abstract_reloader.gd" id="3_08si3"]
|
||||
[ext_resource type="Script" uid="uid://b255rb32vc6co" path="res://game/reloaders/firerate_reloader.gd" id="4_rqarv"]
|
||||
[ext_resource type="Texture2D" uid="uid://6hh66k8s4a1e" path="res://images/weapons.png" id="7_ub67s"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_1rrdy"]
|
||||
script = ExtResource("4_rqarv")
|
||||
firerate = 45
|
||||
metadata/_custom_type_script = "uid://b255rb32vc6co"
|
||||
|
||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_dra6h"]
|
||||
size = Vector2(10, 7)
|
||||
|
||||
@@ -162,7 +155,6 @@ gravity = Vector3(0, 0, 0)
|
||||
script = ExtResource("2_08si3")
|
||||
sector_angle = 10
|
||||
Projectile = ExtResource("2_1rrdy")
|
||||
reloaders = Array[ExtResource("3_08si3")]([SubResource("Resource_1rrdy")])
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="." index="0"]
|
||||
texture = SubResource("PlaceholderTexture2D_dra6h")
|
||||
@@ -174,6 +166,12 @@ animation = &"player_idle"
|
||||
[node name="GPUParticles2D" type="GPUParticles2D" parent="." index="2"]
|
||||
amount = 16
|
||||
texture = SubResource("GradientTexture1D_ucdpq")
|
||||
lifetime = 0.09999999999999999
|
||||
lifetime = 0.1
|
||||
fixed_fps = 10
|
||||
process_material = SubResource("ParticleProcessMaterial_ifsj2")
|
||||
|
||||
[node name="CooldownTimer" type="Timer" parent="." index="3"]
|
||||
wait_time = 1.3
|
||||
one_shot = true
|
||||
|
||||
[connection signal="timeout" from="CooldownTimer" to="." method="_on_cooldown_timer_timeout"]
|
||||
|
||||
Reference in New Issue
Block a user