Rewriting ships: Added some player interface and started rewriting star system
This commit is contained in:
parent
6957169ba5
commit
4172b336c1
20 changed files with 300 additions and 139 deletions
|
|
@ -28,6 +28,9 @@ class_name Hull
|
|||
else:
|
||||
ship.destroyed.emit()
|
||||
|
||||
## Length of linear_velocity vector
|
||||
var scalar_velocity: float = 0.0
|
||||
|
||||
## Adds amount to ammunition, returns true if it was successful
|
||||
func add_ammunition(which: String, value: float) -> bool:
|
||||
if ammunition[which] + value < 0:
|
||||
|
|
@ -41,3 +44,4 @@ func add_ammunition(which: String, value: float) -> bool:
|
|||
func _physics_process(_delta):
|
||||
ship.position = position
|
||||
ship.rotation = rotation
|
||||
scalar_velocity = linear_velocity.length()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue