[Add] Screen Init & Base new menu

This commit is contained in:
2026-06-06 23:20:40 +07:00
parent 1a6f403d72
commit 7104089c00
18 changed files with 4728 additions and 3320 deletions
@@ -17,6 +17,8 @@ namespace Minesweeper.Presentation.Views
{
root = gameObject;
}
AutoBind();
}
private void OnEnable()
@@ -49,5 +51,23 @@ namespace Minesweeper.Presentation.Views
{
StartClicked?.Invoke();
}
public void Bind(GameObject root, Button startButton)
{
this.root = root != null ? root : gameObject;
this.startButton = startButton;
}
private void AutoBind()
{
if (startButton == null)
{
var startButtonTransform = transform.Find("StartButton");
if (startButtonTransform != null)
{
startButton = startButtonTransform.GetComponent<Button>();
}
}
}
}
}