Rewriting ships: Movement system
This commit is contained in:
parent
828f4c52c7
commit
e2b9fa6c69
10 changed files with 208 additions and 0 deletions
8
scripts/Ship/player_input_controller.gd
Normal file
8
scripts/Ship/player_input_controller.gd
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
extends Node2D
|
||||
|
||||
## Shortcut to get_parent()
|
||||
@onready var ship: Ship = get_parent()
|
||||
|
||||
func _physics_process(_delta):
|
||||
ship.engine.acceleration_axis = Input.get_axis("deccelerate", "accelerate")
|
||||
ship.engine.rotation_axis = Input.get_axis("rotateleft", "rotateright")
|
||||
Loading…
Add table
Add a link
Reference in a new issue