Initial commit (1/2)

This commit is contained in:
Алкесей Мирнеков 2023-11-05 16:23:18 +03:00 committed by GitHub
commit 3411c5796d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
66 changed files with 2261 additions and 0 deletions

28
scripts/MainShipScript.gd Normal file
View file

@ -0,0 +1,28 @@
extends CharacterBody2D
class_name MainShip
@onready var MSEngine = $Engine
@onready var Hull = $Hull
@onready var Shield = $Shield
@onready var PauseController = $GUI/Interface/PauseController
@onready var Minimap = $CanvasLayer/Control/Minimap
@onready var Camera = $Camera
var AllowShooting = true
var Fraction = "player"
var Money : float = 1000
func _physics_process(_delta):
if Hull.HP < 0: destroy()
func changeinterfacecolor():
$GUI/Interface.modulate = modulate
func destroy():
Hull.HP = Hull.MaxHP
#Hull.Fuel = Hull.MaxFuel
Shield.Capacity = Shield.MaxShieldCapacity
global_position = Vector2.ZERO
MSEngine.Speed = 0
MSEngine.TurboEnabled = false