Rewriting ships: Added some player interface and started rewriting star system

This commit is contained in:
2ndbeam 2024-04-30 16:22:55 +03:00
commit 4172b336c1
20 changed files with 300 additions and 139 deletions

17
scripts/star_system.gd Normal file
View file

@ -0,0 +1,17 @@
extends Node
class_name StarSystem
@export var width: int = 8192
@export var height: int = 8192
var player_ship: PlayerShip
func _ready():
player_ship = get_node_or_null("PlayerShip")
if player_ship != null:
player_ship.camera.limit_left = -width / 2
player_ship.camera.limit_right = -width / 2
player_ship.camera.limit_top = -height / 2
player_ship.camera.limit_bottom = -height / 2