Updated input component and player component handling to use tab to
cycle weapons.
This commit is contained in:
parent
e2cf516c90
commit
63ed0aae3a
4 changed files with 24 additions and 15 deletions
|
|
@ -20,7 +20,7 @@ var ship_displacement: float
|
|||
var travel: float = 0
|
||||
|
||||
func _ready() -> void:
|
||||
|
||||
|
||||
## Set initial start position
|
||||
position = Vector2(screensize.x / 2, screensize.y - 45)
|
||||
|
||||
|
|
@ -37,12 +37,16 @@ func _process(delta) -> void:
|
|||
if is_shooting == true:
|
||||
shoot_component.shoot()
|
||||
$%MuzzleFlash.show()
|
||||
|
||||
|
||||
if is_shooting == false:
|
||||
$%MuzzleFlash.hide()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Read Movement Component
|
||||
movement_component.input = input_component.move_dir
|
||||
movement_component.tick(delta)
|
||||
|
||||
# Cycle weapon (testing key)
|
||||
if input_component.cycle_weapon:
|
||||
weapon_component.cycle_weapon()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue