2.6.6 • Published 1 year ago

com.vovgou.loxodon-framework-fgui v2.6.6

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

npm.io

Loxodon Framework FairyGUI

license release npm

Developed by Clark

这是一个支持FairyGUI的插件,安装此插件后可以对FairyGUI的UI控件进行数据绑定。

要求

Loxodon Framework

FairyGUI

本项目作为Loxodon.Framework插件,必须在Loxodon.Framework环境下使用,请在安装使用前先安装Loxodon.Framework和FairyGUI。

快速开始

public class FairyGUIDatabindingExample : MonoBehaviour
{
    public GButton button;
    public GTextInput textInput;

    protected virtual void Awake()
    {
        ApplicationContext context = Context.GetApplicationContext();
        //初始化数据绑定服务,如果使用XLua,则初始化 LuaBindingServiceBundle模块
        BindingServiceBundle bindingService = new BindingServiceBundle(context.GetContainer());
        bindingService.Start();

        //初始化支持FairyGUI的数据绑定相关组件,请在BindingServiceBundle启动后执行
        FairyGUIBindingServiceBundle fairyGUIBindingServiceBundle = new FairyGUIBindingServiceBundle(context.GetContainer());
        fairyGUIBindingServiceBundle.Start();
    }

    protected virtual void Start()
    {
        var bindingSet = this.CreateBindingSet<FairyGUIDatabindingExample, AccountViewModel>();

        bindingSet.Bind(this.textInput).For(v => v.text, v => v.onChanged).To(vm => vm.Username).OneWay();
        bindingSet.Bind(this.button).For(v => v.onClick).To(vm => vm.OnSubmit);

        bindingSet.Build();
    }
}

Contact Us

Email: yangpc.china@gmail.com
Website: https://vovgou.github.io/loxodon-framework/
QQ Group: 622321589 npm.io

2.6.6

1 year ago

2.6.5

1 year ago

2.6.4

2 years ago

2.6.3

2 years ago

2.6.2

2 years ago

2.6.0

2 years ago

2.5.6

2 years ago

2.5.5

3 years ago

2.5.0

3 years ago

2.4.7

3 years ago

2.4.8

3 years ago

2.4.1

3 years ago

2.4.0

3 years ago

2.4.3

3 years ago

2.4.2

3 years ago

2.4.5

3 years ago

2.4.6

3 years ago

2.3.0

3 years ago