Reworked other weapons
This commit is contained in:
@@ -21,18 +21,6 @@ func shoot(ship_velocity: Vector2) -> bool:
|
||||
return is_shot
|
||||
|
||||
|
||||
func _get_projectile_position() -> Vector2:
|
||||
var projectile_position : Vector2
|
||||
|
||||
match _belonging:
|
||||
Belonging.PLAYER:
|
||||
projectile_position = Vector2(-5, 2)
|
||||
Belonging.ENEMY:
|
||||
projectile_position = Vector2(5, -2)
|
||||
|
||||
return projectile_position
|
||||
|
||||
|
||||
func _on_animated_sprite_2d_animation_finished() -> void:
|
||||
sprite.play(PREFIXES[_belonging] + RELOAD_POSTFIX)
|
||||
|
||||
|
||||
@@ -101,6 +101,7 @@ sector_angle = 2
|
||||
Projectile = ExtResource("2_yluvp")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." index="0"]
|
||||
position = Vector2(8, 0)
|
||||
sprite_frames = SubResource("SpriteFrames_hyw35")
|
||||
animation = &"player_reloading"
|
||||
|
||||
@@ -109,5 +110,8 @@ process_callback = 0
|
||||
wait_time = 0.4
|
||||
one_shot = true
|
||||
|
||||
[node name="Muzzle" parent="." index="2"]
|
||||
position = Vector2(9, 2)
|
||||
|
||||
[connection signal="animation_finished" from="AnimatedSprite2D" to="." method="_on_animated_sprite_2d_animation_finished"]
|
||||
[connection signal="timeout" from="CooldownTimer" to="." method="_on_cooldown_timer_timeout"]
|
||||
|
||||
Reference in New Issue
Block a user