Done refactoring

This commit is contained in:
2ndbeam 2023-11-05 21:51:47 +03:00
commit 2176e9d798
88 changed files with 821 additions and 880 deletions

View file

@ -0,0 +1,27 @@
extends CharacterBody2D
class_name MainShip
@onready var engine = $Engine
@onready var hull = $Hull
@onready var shield = $Shield
@onready var pause_controller = $GUI/Interface/PauseController
@onready var minimap = $CanvasLayer/Control/Minimap
@onready var camera = $Camera
var allow_shooting = true
var faction = "player"
var money : float = 1000
func _process(_delta):
if hull.hp < 0: destroy()
func changeinterfacecolor():
$GUI/Interface.modulate = modulate
func destroy():
hull.hp = hull.max_hp
shield.capacity = shield.max_capacity
global_position = Vector2.ZERO
engine.speed = 0
engine.turbo_enabled = false