Initial commit (1/2)
This commit is contained in:
commit
3411c5796d
66 changed files with 2261 additions and 0 deletions
28
scripts/MainShipScript.gd
Normal file
28
scripts/MainShipScript.gd
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue