Added in editor warnings when weapons are missing components (Audioplayer, Shot spawn location, projectile PackedScene)

Added functionality for weapons to fire projectiles.
This commit is contained in:
KingGurke 2025-04-03 12:26:41 +02:00
parent 9621323983
commit 40ffbb84cd
8 changed files with 135 additions and 17 deletions

View file

@ -5,7 +5,7 @@ extends FlyerController
func _physics_process(delta: float) -> void:
if not Engine.is_editor_hint():
controlled_flyer.directionInput = Vector2(Input.get_axis("plane_left","plane_right"), Input.get_axis("plane_up","plane_down"))
if InputMap.has_action("shoot_primary") and Input.is_action_just_pressed("shoot_primary"):
controlled_flyer.shoot(1)
if InputMap.has_action("shoot_secondary") and Input.is_action_just_pressed("shoot_secondary"):
controlled_flyer.shoot(2)
if InputMap.has_action("shoot_primary") and Input.is_action_pressed("shoot_primary"):
controlled_flyer.shoot(0)
if InputMap.has_action("shoot_secondary") and Input.is_action_pressed("shoot_secondary"):
controlled_flyer.shoot(1)