Skip to content

Commit

Permalink
add placeholder main menu with field background
Browse files Browse the repository at this point in the history
  • Loading branch information
Lurkki14 committed Feb 17, 2020
1 parent 658228e commit 969bd94
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 0 deletions.
16 changes: 16 additions & 0 deletions menus/NewMainMenu.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
extends Spatial

func disable_car_controls(node: Node) -> void:
for n in node.get_children():
if n.get_child_count() > 0:
if n is VehicleBody:
print(n)
n.set_process_input(false)
disable_car_controls(n)
elif n is VehicleBody:
print(n)
n.set_process_input(false)

func _ready():
# Disable car controls
disable_car_controls(self)
31 changes: 31 additions & 0 deletions menus/NewMainMenu.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[gd_scene load_steps=4 format=2]

[ext_resource path="res://Field.tscn" type="PackedScene" id=1]
[ext_resource path="res://menus/NewMainMenu.gd" type="Script" id=2]
[ext_resource path="res://icon.png" type="Texture" id=3]

[node name="Spatial" type="Spatial"]
script = ExtResource( 2 )

[node name="Camera" type="Camera" parent="."]
transform = Transform( 0.623334, -0.188762, 0.758831, 0, 0.970426, 0.241397, -0.781956, -0.150471, 0.6049, 25.6566, 12.5673, 21.4531 )
fov = 40.6

[node name="Field" parent="." instance=ExtResource( 1 )]

[node name="CanvasLayer" type="CanvasLayer" parent="."]

[node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer"]
margin_right = 307.0
margin_bottom = 731.0
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Button" type="Button" parent="CanvasLayer/HBoxContainer"]
margin_right = 307.0
margin_bottom = 70.0
size_flags_horizontal = 3
size_flags_vertical = 0
text = "HELLO"
icon = ExtResource( 3 )
30 changes: 30 additions & 0 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,43 @@ _global_script_classes=[ {
"language": "GDScript",
"path": "res://BoostExhaust.gd"
}, {
"base": "Resource",
"class": "CtxFRef1",
"language": "GDScript",
"path": "res://utils/goldenGadget/CtxFRef1.gd"
}, {
"base": "Resource",
"class": "CtxFRef2",
"language": "GDScript",
"path": "res://utils/goldenGadget/CtxFRef2.gd"
}, {
"base": "Resource",
"class": "GGArray",
"language": "GDScript",
"path": "res://utils/goldenGadget/GGArray.gd"
}, {
"base": "Resource",
"class": "GGInternal",
"language": "GDScript",
"path": "res://utils/goldenGadget/GGInternal.gd"
}, {
"base": "Node",
"class": "GGTests",
"language": "GDScript",
"path": "res://utils/goldenGadget/GGTests.gd"
}, {
"base": "VehicleBody",
"class": "RocketCar",
"language": "GDScript",
"path": "res://VehicleBody.gd"
} ]
_global_script_class_icons={
"BoostExhaust": "",
"CtxFRef1": "",
"CtxFRef2": "",
"GGArray": "",
"GGInternal": "",
"GGTests": "",
"RocketCar": ""
}

Expand Down

0 comments on commit 969bd94

Please sign in to comment.