toolsmax0_COMP3911_Game/Assets/Scripts/UIFramework/Concrete/StartPanel.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

/// <summary>
/// Start main panel
/// </summary>
public class StartPanel : BasePanel
{
    static readonly string path = "Prefabs/UI/Panel/StartPanel";

    public StartPanel() : base(new UIType(path)) { }

    public override void OnEnter()
    {
        UITool.GetOrAddComponentInChildren<Button>("BtnSetting").onClick.AddListener(() =>
        {
            // Click events can be written in here
            Debug.Log("The set button is clicked");
            PanelManager.Push(new SettingPanel());
        });
        UITool.GetOrAddComponentInChildren<Button>("BtnPlay").onClick.AddListener(() =>
        {
            // Click events can be written in here
            // GameRoot.Instance.SceneSystem.SetScene(new MainScene());
            PanelManager.Pop();
        });
    }
}
