/// #pkgName FGUI包名
/// #panelName UIPanel名字
/// #UIName = $"{#pkgName}{#panelName}" UIKey名字
/// #PropertyDefineArea 属性定义区域
/// #PropertyAssignArea 属性赋值区域
/// #ComponentType 组件类型
/// #PropertyName 属性名字
/// 该脚本由模板创建，不可编辑
/// created by cb 2024
using FairyGUI;
using XGame.Framework.FGUI;
using XGame.Framework.UI;

namespace FL.FGUI
{
    /// <summary>
    /// 该脚本由模板创建，不可修改，不可编辑
    /// </summary>
    public partial class DragonEggEquipmentUIVM : FguiViewModel
    {
        public CommonItemBaseView Weapon { get; private set; }
        public CommonItemBaseView Clothes { get; private set; }
        public CommonItemBaseView Helmet { get; private set; }
        public CommonItemBaseView Hand { get; private set; }
        public CommonItemBaseView Boots { get; private set; }
        public CommonItemBaseView Pants { get; private set; }

        protected override void BindComponents(GComponent panel, IUIViewAdapter adapter)
        {
            Weapon = adapter.CreateNested<CommonItemBaseView>(new FguiNested(panel.GetChild("Weapon").asCom), true);
            Clothes = adapter.CreateNested<CommonItemBaseView>(new FguiNested(panel.GetChild("Clothes").asCom), true);
            Helmet = adapter.CreateNested<CommonItemBaseView>(new FguiNested(panel.GetChild("Helmet").asCom), true);
            Hand = adapter.CreateNested<CommonItemBaseView>(new FguiNested(panel.GetChild("Hand").asCom), true);
            Boots = adapter.CreateNested<CommonItemBaseView>(new FguiNested(panel.GetChild("Boots").asCom), true);
            Pants = adapter.CreateNested<CommonItemBaseView>(new FguiNested(panel.GetChild("Pants").asCom), true);

        }
    }
}