Equipment menu

This commit is contained in:
gotfishmakesticks 2024-01-13 10:58:44 +03:00
commit bef15301cb
28 changed files with 809 additions and 48 deletions

View file

@ -7,17 +7,28 @@ class_name ShipEngine
@export var acceleration : float = 50
@export var fuel_consumption : float = 100
@export var rotation_speed : int = 90
@export var id : String = "starterengine"
@onready var ship = get_parent()
@onready var hull = $"../Hull"
var hull
var speed = 0
var min_speed = max_speed / -4
var turbo_enabled = false
var alternative_movement = false
var destination_angle : float
var destination_difference : float
var rdy = false
func _ready():
get_tree().create_timer(0.05).timeout.connect(is_rdy)
func is_rdy():
rdy = true
hull = ship.hull
func _physics_process(delta):
if !rdy:
return
hull = ship.hull
var turbo_input = Input.get_action_raw_strength("turbo")
var acceleration_input = Input.get_axis("deccelerate", "accelerate") if ship is MainShip else 1.0
var rotation_input = Input.get_axis("rotateleft","rotateright")