Implemented state machine & added NPC ship template
This commit is contained in:
parent
2d4eb92751
commit
bda9232e72
15 changed files with 284 additions and 22 deletions
|
|
@ -19,6 +19,8 @@ class_name Hull
|
|||
}
|
||||
## How much speed should ship have before collision to take damage
|
||||
@export var velocity_collision_treshold: float = 200.0
|
||||
## How much damage should ship take when its velocity equals to treshold
|
||||
@export var collision_damage: float = 20.0
|
||||
## Current ammunition. Change this with set_ammunition
|
||||
@onready var ammunition: Dictionary = max_ammunition.duplicate()
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ signal destroyed
|
|||
@onready var spawn_position: Vector2 = global_position
|
||||
|
||||
## Faction which this ship belongs to
|
||||
var faction : Game.Faction = Game.Faction.Player
|
||||
var faction : Game.Faction
|
||||
|
||||
func _ready() -> void:
|
||||
hull.global_position = global_position
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue