Implemented state machine & added NPC ship template

This commit is contained in:
2ndbeam 2024-05-01 17:45:17 +03:00
commit bda9232e72
15 changed files with 284 additions and 22 deletions

View file

@ -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()

View file

@ -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