2
This commit is contained in:
parent
0a17bf8103
commit
fc017ae798
6
Scenes/Earth.tscn
Normal file
6
Scenes/Earth.tscn
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[gd_scene load_steps=2 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://Scripts/Earth.cs" type="Script" id=1]
|
||||||
|
|
||||||
|
[node name="Earth" type="Node2D"]
|
||||||
|
script = ExtResource( 1 )
|
@ -1,6 +0,0 @@
|
|||||||
[gd_scene load_steps=2 format=2]
|
|
||||||
|
|
||||||
[ext_resource path="res://Scripts/MainMenu.cs" type="Script" id=1]
|
|
||||||
|
|
||||||
[node name="MainMenu" type="Node2D"]
|
|
||||||
script = ExtResource( 1 )
|
|
37
Scenes/Menus/MainMenu.tscn
Normal file
37
Scenes/Menus/MainMenu.tscn
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
[gd_scene load_steps=2 format=2]
|
||||||
|
|
||||||
|
[ext_resource path="res://Scripts/MainMenu.cs" type="Script" id=1]
|
||||||
|
|
||||||
|
[node name="MainMenu" type="Node2D"]
|
||||||
|
script = ExtResource( 1 )
|
||||||
|
|
||||||
|
[node name="CenterContainer" type="CenterContainer" parent="."]
|
||||||
|
margin_right = 1024.0
|
||||||
|
margin_bottom = 600.0
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Start" type="Button" parent="CenterContainer"]
|
||||||
|
margin_left = 491.0
|
||||||
|
margin_top = 290.0
|
||||||
|
margin_right = 532.0
|
||||||
|
margin_bottom = 310.0
|
||||||
|
text = "Start"
|
||||||
|
|
||||||
|
[node name="Options" type="Button" parent="CenterContainer"]
|
||||||
|
visible = false
|
||||||
|
margin_left = 480.0
|
||||||
|
margin_top = 290.0
|
||||||
|
margin_right = 543.0
|
||||||
|
margin_bottom = 310.0
|
||||||
|
text = "Options"
|
||||||
|
|
||||||
|
[node name="Exit" type="Button" parent="CenterContainer"]
|
||||||
|
visible = false
|
||||||
|
margin_left = 494.0
|
||||||
|
margin_top = 290.0
|
||||||
|
margin_right = 529.0
|
||||||
|
margin_bottom = 310.0
|
||||||
|
text = "Exit"
|
||||||
|
[connection signal="pressed" from="CenterContainer/Start" to="." method="_on_Start_pressed"]
|
10
Scripts/Earth.cs
Normal file
10
Scripts/Earth.cs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
public class Earth : Node2D
|
||||||
|
{
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -3,19 +3,12 @@ using System;
|
|||||||
|
|
||||||
public class MainMenu : Node2D
|
public class MainMenu : Node2D
|
||||||
{
|
{
|
||||||
// Declare member variables here. Examples:
|
|
||||||
// private int a = 2;
|
|
||||||
// private string b = "text";
|
|
||||||
|
|
||||||
// Called when the node enters the scene tree for the first time.
|
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
|
var StartButton = GetNode<Button>("Start");
|
||||||
|
}
|
||||||
|
private void _on_Start_pressed()
|
||||||
|
{
|
||||||
|
GetTree().ChangeScene("res://Scenes/Earth.tscn");
|
||||||
}
|
}
|
||||||
|
|
||||||
// // Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
||||||
// public override void _Process(float delta)
|
|
||||||
// {
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ _global_script_class_icons={
|
|||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="paraBellumSacrum"
|
config/name="paraBellumSacrum"
|
||||||
run/main_scene="res://Scenes/MainMenu.tscn"
|
run/main_scene="res://Scenes/Menus/MainMenu.tscn"
|
||||||
config/icon="res://icon.png"
|
config/icon="res://icon.png"
|
||||||
|
|
||||||
[rendering]
|
[rendering]
|
||||||
|
Loading…
Reference in New Issue
Block a user