Added projectiles timeouts. Added GatlingWeapon animation
This commit is contained in:
@@ -32,7 +32,7 @@ func create_enemy() -> void:
|
||||
_update_enemy.call_deferred(enemy)
|
||||
|
||||
|
||||
func _on_enemy_update_timer_timeout() -> void:
|
||||
func _on_enemy_update_timer_timeout() -> void:
|
||||
var enemies := get_tree().get_nodes_in_group("enemies")
|
||||
if enemies.is_empty(): return
|
||||
|
||||
@@ -69,7 +69,7 @@ func _target_enemy_to_player(enemy: AbstractEnemyShip, player: PlayerShip) -> vo
|
||||
AbstractWeapon.Type.HOMING:
|
||||
_update_enemy_target_position(enemy, player, LONG_DISTANCE, INDIRECT_OFFSET)
|
||||
AbstractWeapon.Type.MINES:
|
||||
_update_enemy_target_position(enemy, player, SHORT_DISTANCE, INDIRECT_OFFSET)
|
||||
_update_enemy_target_position(enemy, player, MEDIUM_DISTANCE, INDIRECT_OFFSET)
|
||||
|
||||
|
||||
func _update_enemy_target_position(
|
||||
|
||||
@@ -27,7 +27,8 @@ func _physics_process(delta: float) -> void:
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("blink"):
|
||||
var input_direction := _get_input_direction()
|
||||
blink.emit(input_direction)
|
||||
if not input_direction.is_zero_approx():
|
||||
blink.emit(input_direction)
|
||||
|
||||
func _get_input_direction() -> Vector2:
|
||||
return Input.get_vector("move_left", "move_right", "move_up", "move_down")
|
||||
|
||||
Reference in New Issue
Block a user