mirror of
https://codeberg.org/Melon-Bread/Comets.gd.git
synced 2025-07-06 22:54:36 -04:00
Invader can no longer shoot itself (hopefully)
This commit is contained in:
@ -32,7 +32,7 @@ func _process(delta: float) -> void:
|
||||
|
||||
if can_shoot:
|
||||
# FIXME: Proper shoot angle and not able to sudoku
|
||||
shoot($GunMarker.global_position, randf_range(90.0, 100.0))
|
||||
shoot($GunMarker.global_position, randf_range(90.0, 92.0))
|
||||
|
||||
# "Die", if off screen
|
||||
if position.x > viewport_size.x or position.x < 0:
|
||||
@ -54,6 +54,7 @@ func shoot(pos : Vector2, rot : float) -> void:
|
||||
var bullet := BULLET.instantiate()
|
||||
bullet.position = pos
|
||||
bullet.rotation = rot
|
||||
bullet.life_span = 0.3
|
||||
$Projectiles.add_child(bullet)
|
||||
$ShootSound.play()
|
||||
can_shoot = false
|
||||
|
Reference in New Issue
Block a user