diff --git a/game/autoload/autoload.gd b/game/autoload/autoload.gd index 20c40c0..b8c4180 100644 --- a/game/autoload/autoload.gd +++ b/game/autoload/autoload.gd @@ -1,5 +1,8 @@ extends Node +var lnSpaceSystem = load("res://lunco-core/space-system.gd") + + func _ready(): print("Autoload ready") diff --git a/game/lunco-core/map.gd b/game/lunco-core/map.gd index bc43bd7..9b9f246 100644 --- a/game/lunco-core/map.gd +++ b/game/lunco-core/map.gd @@ -1,3 +1,4 @@ class_name lnMap -extends lnSpaceSystem + +extends "res://lunco-core/space-system.gd" diff --git a/game/lunco-core/matrix.gd b/game/lunco-core/matrix.gd index 71075f9..7271275 100644 --- a/game/lunco-core/matrix.gd +++ b/game/lunco-core/matrix.gd @@ -1,10 +1,10 @@ # This is basically the simulation world # Check terms for more information class_name lnMatrix -extends lnSpaceSystem +extends "res://lunco-core/space-system.gd" #TODO: Introduce GravitaionField class that describes gravitation field in 4D space e.g. gravitation = F(time, x, y, z) -var GravitationField := lnGravitationField.new() +# var GravitationField := lnGravitationField.new() var LocalTime onready var player = $Player diff --git a/game/lunco-core/nodes/avatar.gd b/game/lunco-core/nodes/avatar.gd index f2d778c..b77dd75 100644 --- a/game/lunco-core/nodes/avatar.gd +++ b/game/lunco-core/nodes/avatar.gd @@ -1,4 +1,8 @@ -extends lnSpaceSystem +extends "res://lunco-core/space-system.gd" + +onready var lnMatrix = preload("res://lunco-core/matrix.gd") + +onready var lnOperator = preload("res://controllers/operator/operator.gd") #------------------------------- const MOUSE_SENSITIVITY = 0.1 diff --git a/game/lunco-core/processor.gd b/game/lunco-core/processor.gd index 606f924..4a9c065 100644 --- a/game/lunco-core/processor.gd +++ b/game/lunco-core/processor.gd @@ -1,3 +1,3 @@ #The one which processes commands class_name lnProcessor -extends lnSpaceSystem +extends "res://lunco-core/space-system.gd" diff --git a/game/lunco-core/space-system.gd b/game/lunco-core/space-system.gd index 026ba4d..7c28087 100644 --- a/game/lunco-core/space-system.gd +++ b/game/lunco-core/space-system.gd @@ -2,6 +2,7 @@ class_name lnSpaceSystem extends Node #TODO: Check if should be node, maybe something else? + #Basic parameters inspired by XTCE export var Commands = {} export var Telemetry = {} @@ -12,5 +13,5 @@ export var State = {} # Hierarchical state machine export var Behaviour = {} # Behaviour tree #---------------- -func process_command(command: lnCommand) -> bool: +func process_command(command) -> bool: return true diff --git a/game/project.godot b/game/project.godot index 8a0e1ca..e230e88 100644 --- a/game/project.godot +++ b/game/project.godot @@ -494,12 +494,12 @@ _global_script_classes=[ { "language": "GDScript", "path": "res://lunco-core/gravitation-field.gd" }, { -"base": "lnSpaceSystem", +"base": "Node", "class": "lnMap", "language": "GDScript", "path": "res://lunco-core/map.gd" }, { -"base": "lnSpaceSystem", +"base": "Node", "class": "lnMatrix", "language": "GDScript", "path": "res://lunco-core/matrix.gd" @@ -514,7 +514,7 @@ _global_script_classes=[ { "language": "GDScript", "path": "res://controllers/player/player.gd" }, { -"base": "lnSpaceSystem", +"base": "Node", "class": "lnProcessor", "language": "GDScript", "path": "res://lunco-core/processor.gd" diff --git a/game/ui/spacecraft-ui.tscn b/game/ui/spacecraft-ui.tscn index 2e30523..e02a147 100644 --- a/game/ui/spacecraft-ui.tscn +++ b/game/ui/spacecraft-ui.tscn @@ -2,7 +2,7 @@ [ext_resource path="res://ui/spacecraft-ui.gd" type="Script" id=1] [ext_resource path="res://assets/fonts/ui_font_outline.tres" type="DynamicFont" id=2] -[ext_resource path="res://ui/widgets/Stopwatch.tscn" type="PackedScene" id=3] +[ext_resource path="res://ui/widgets/stopwatch.tscn" type="PackedScene" id=3] [node name="SpacecraftUI" type="Control"] anchor_right = 1.0 @@ -116,21 +116,22 @@ margin_top = 410.0 margin_right = 167.0 margin_bottom = 494.0 -[node name="Stopwatch_Label" type="Label" parent="MET"] +[node name="Stopwatch" parent="MET" instance=ExtResource( 3 )] +margin_left = 0.0 +margin_top = 0.0 margin_right = 128.0 margin_bottom = 40.0 +text = "00:00:00" + +[node name="Stopwatch_Label" type="Label" parent="MET"] +margin_top = 44.0 +margin_right = 128.0 +margin_bottom = 84.0 custom_fonts/font = ExtResource( 2 ) text = "MET: " __meta__ = { "_edit_use_anchors_": false } -[node name="Stopwatch" parent="MET" instance=ExtResource( 3 )] -margin_left = 0.0 -margin_top = 44.0 -margin_right = 128.0 -margin_bottom = 84.0 -text = "00:00:00" - [connection signal="timeout" from="UpdateUI" to="." method="_on_UpdateUI_timeout"] [connection signal="timeout" from="HideControls" to="." method="_on_HideControls_timeout"] diff --git a/game/ui/widgets/stopwatch.tscn b/game/ui/widgets/stopwatch.tscn index 3fc9b70..017ce64 100644 --- a/game/ui/widgets/stopwatch.tscn +++ b/game/ui/widgets/stopwatch.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://ui/widgets/Stopwatch.gd" type="Script" id=1] +[ext_resource path="res://ui/widgets/stopwatch.gd" type="Script" id=1] [ext_resource path="res://assets/fonts/ui_font_outline.tres" type="DynamicFont" id=2] [node name="Label" type="Label"]