first commit

This commit is contained in:
2022-07-02 21:23:45 +08:00
commit 7cdcaf1e2f
102 changed files with 7208 additions and 0 deletions

View File

@ -0,0 +1,34 @@
using BallanceStalker;
using Godot;
using System;
public class MenuMain : Control {
[Signal]
public delegate void MenuMain_GotoPage(MenuManager.MenuPage menu_type);
[Signal]
public delegate void MenuMain_Back();
[Signal]
public delegate void MenuMain_Exit();
// Called when the node enters the scene tree for the first time.
public override void _Ready() {
GetNode<ButtonCommon>("MenuList/BtnLoadLevel").Connect("pressed", this, nameof(Proc_GotoPage), new Godot.Collections.Array() { MenuManager.MenuPage.LoadLevel });
GetNode<ButtonCommon>("MenuList/BtnLoadSky").Connect("pressed", this, nameof(Proc_GotoPage), new Godot.Collections.Array() { MenuManager.MenuPage.LoadSky });
GetNode<ButtonCommon>("MenuList/BtnMultiplayer").Connect("pressed", this, nameof(Proc_GotoPage), new Godot.Collections.Array() { MenuManager.MenuPage.Multiplayer });
GetNode<ButtonCommon>("MenuList/BtnAbout").Connect("pressed", this, nameof(Proc_GotoPage), new Godot.Collections.Array() { MenuManager.MenuPage.About });
GetNode<ButtonCommon>("MenuList/BtnBack").Connect("pressed", this, nameof(Proc_Back));
GetNode<ButtonCommon>("MenuList/BtnExit").Connect("pressed", this, nameof(Proc_Exit));
}
private void Proc_GotoPage(MenuManager.MenuPage menu_type) {
EmitSignal(nameof(MenuMain_GotoPage), menu_type);
}
private void Proc_Back() {
EmitSignal(nameof(MenuMain_Back));
}
private void Proc_Exit() {
EmitSignal(nameof(MenuMain_Exit));
}
}