More enemy AI added

This commit is contained in:
2025-11-29 16:15:42 +03:00
parent 371ded7d06
commit 16ba892f74
15 changed files with 106 additions and 26 deletions
+9 -2
View File
@@ -11,8 +11,15 @@ extends AbstractShip
func _ready() -> void:
super._ready()
for weapon in _weapons:
weapon.set_belonging(AbstractWeapon.Belonging.PLAYER)
for weapon_position in weapon_positions:
var weapon : AbstractWeapon = WEAPONS.pick_random().instantiate()
_add_weapon(weapon, weapon_position)
func _add_weapon(weapon: AbstractWeapon, weapon_position: Vector2) -> void:
super._add_weapon(weapon, weapon_position)
weapon.set_belonging(AbstractWeapon.Belonging.PLAYER)
func _on_player_controller_shoot(weapon_index: int) -> void: