Update ship.tscn and ship.gd

This commit is contained in:
2024-05-12 22:37:25 -04:00
parent fb60dfce61
commit 1d5df2b795
2 changed files with 5 additions and 3 deletions

View File

@ -4,6 +4,8 @@ extends CharacterBody2D
# FIXME: Tweak speed and shoot time values
# FIXME: Tweak Ship's scale
signal crashed
const BULLET = preload("res://scenes/bullet.tscn")
@export var accleration := 90.0
@ -47,8 +49,8 @@ func fire_gun(pos : Vector2, rot : float) -> void:
$ShotCooldown.start()
func crash():
# TODO: Maybe emit a signal that the main game node listens for "game over" state
# TODO: Make some kind of crash animation or crashed sprite
crashed.emit()
$AnimationPlayer.play("crash")