Rewriting ships: Added weapon base and changed hull parent to Node

This commit is contained in:
2ndbeam 2024-04-29 12:08:13 +03:00
commit 6957169ba5
13 changed files with 121 additions and 37 deletions

View file

@ -6,3 +6,9 @@ extends Node2D
func _physics_process(_delta) -> void:
ship.engine.acceleration_axis = Input.get_axis("deccelerate", "accelerate")
ship.engine.rotation_axis = Input.get_axis("rotateleft", "rotateright")
for weapon in ship.weapons.list:
match weapon.action_id:
"primary":
weapon.shoot_request = Input.get_action_strength("shootprimary")
"secondary":
weapon.shoot_request = Input.get_action_strength("shootsecondary")