Added main menu and basic functionality
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class MainMenu : Control
|
||||
{
|
||||
// Called when the node enters the scene tree for the first time.
|
||||
public override void _Ready()
|
||||
{
|
||||
}
|
||||
|
||||
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnPlayPressed()
|
||||
{
|
||||
GetTree().ChangeSceneToFile("res://Scenes/Game.tscn");
|
||||
}
|
||||
|
||||
public void OnQuitPressed()
|
||||
{
|
||||
GetTree().Quit();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
uid://dda0bhhqspbr0
|
||||
@@ -89,6 +89,7 @@ public partial class World : Node3D
|
||||
{
|
||||
Robot robot = ResourceLoader.LoadRobotPrefab().Instantiate<Robot>();
|
||||
robot.Position = map[0].tiles[1,1].Position;
|
||||
robot.Position -= new Vector3(0,1.5f,0);
|
||||
AddChild(robot);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user