• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

vovgou/loxodon-framework: An MVVM & Databinding framework that can use C# an ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

vovgou/loxodon-framework

开源软件地址(OpenSource Url):

https://github.com/vovgou/loxodon-framework

开源编程语言(OpenSource Language):

C# 99.4%

开源软件介绍(OpenSource Introduction):

Loxodon Framework

license release openupm npm

(中文版)

MVVM and Databinding for Unity3d(C# & XLua & ILRuntime)

Developed by Clark

Requires Unity 2018.4 or higher.

LoxodonFramework is a lightweight MVVM(Model-View-ViewModel) framework built specifically to target Unity3D. Databinding and localization are supported.It has a very flexible extensibility.It makes your game development faster and easier.

For tutorials,examples and support,please see the project.You can also discuss the project in the Unity Forums.

The plugin is compatible with MacOSX,Windows,Linux,UWP,WebGL,IOS and Android,and provides all the source code of the project.

If you like this framework or think it is useful, please write a review on AssetStore or give me a STAR or FORK it on Github, thank you!

Tested in Unity 3D on the following platforms:
PC/Mac/Linux
IOS
Android
UWP(window10)
WebGL

Installation

For detailed installation steps, please refer to the installation documentation.

English manual

Key Features:

  • MVVM Framework;
  • Multiple platforms;
  • Higher Extensibility;
  • async&await (C#&Lua)
  • try&catch&finally for lua
  • XLua support(You can make your game in lua.);
  • Asynchronous result and asynchronous task are supported;
  • Scheduled Executor and Multi-threading;
  • Messaging system support;
  • Preferences can be encrypted;
  • Localization support;
  • Databinding support:
    • Field binding;
    • Property binding;
    • Dictionary,list and array binding;
    • Event binding;
    • Unity3d's EventBase binding;
    • Static property and field binding;
    • Method binding;
    • Command binding;
    • ObservableProperty,ObservableDictionary and ObservableList binding;
    • Expression binding;

Notes

  • .Net2.0 and .Net2.0 Subset,please use version 1.9.x.
  • LoxodonFramework 2.0 supports .Net4.x and .Net Standard2.0
  • LoxodonFramework 2.0 supports Mono and IL2CPP

Plugins

  • Loxodon Framework Fody

  • Loxodon Framework UIToolkit

  • Loxodon Framework ILRuntime

  • Loxodon Framework Localization For CSV

    It supports localization files in csv format, requires Unity2018.4 or higher.

  • Loxodon Framework XLua

    It supports making games with lua scripts.

  • Loxodon Framework Bundle

    Loxodon Framework Bundle is an AssetBundle manager.It provides a functionality that can automatically manage/load an AssetBundle and its dependencies from local or remote location.Asset Dependency Management including BundleManifest that keep track of every AssetBundle and all of their dependencies. An AssetBundle Simulation Mode which allows for iterative testing of AssetBundles in a the Unity editor without ever building an AssetBundle.

    The asset redundancy analyzer can help you find the redundant assets included in the AssetsBundles.Create a fingerprint for the asset by collecting the characteristic data of the asset. Find out the redundant assets in all AssetBundles by fingerprint comparison.it only supports the AssetBundle of Unity 5.6 or higher.

  • Loxodon Framework Log4Net

    This is a log plugin.It helps you to use Log4Net in the Unity3d.

  • Loxodon Framework Obfuscation

    NOTE:Please enable "Allow unsafe Code"

    Example:

      ObfuscatedInt  length = 200;
      ObfuscatedFloat scale = 20.5f;
      int offset = 30;
      
      float value = (length * scale) + offset;
    
  • Loxodon Framework Addressable

  • Loxodon Framework Connection

    This is a network connection component, implemented using TcpClient, supports IPV6 and IPV4, automatically recognizes the current network when connecting with a domain name, and preferentially connects to the IPV4 network.

  • DotNetty for Unity

    DotNetty is a port of Netty, asynchronous event-driven network application framework for rapid development of maintainable high performance protocol servers & clients.

    This version is modified based on DotNetty's 0.7.2 version and is a customized version for the Unity development platform. It removes some dependent libraries and passes the test under IL2CPP.

  • LiteDB

    LiteDB is a small, fast and lightweight NoSQL embedded database.

  • SQLite4Unity3d

    When I started with Unity3d development I needed to use SQLite in my project and it was very hard to me to find a place with simple instructions on how to make it work. All I got were links to paid solutions on the Unity3d's Assets Store and a lot of different and complicated tutorials.

    At the end, I decided that there should be a simpler way and I created SQLite4Unity3d, a plugin that helps you to use SQLite in your Unity3d projects in a clear and easy way and works in iOS, Mac, Android and Windows projects.

    It uses the great sqlite-net library as a base so you will have Linq besides sql. For a further reference on what possibilities you have available with this library I encourage you to visit its github repository.

Quick Start

Create a view and view model of the progress bar.

public class ProgressBarViewModel : ViewModelBase
{
    private string tip;
    private bool enabled;
    private float value;
    public ProgressBarViewModel()
    {
    }

    public string Tip
    {
        get { return this.tip; }
        set { this.Set<string>(ref this.tip, value, nameof(Tip)); }
    }

    public bool Enabled
    {
        get { return this.enabled; }
        set { this.Set<bool>(ref this.enabled, value, nameof(Enabled)); }
    }

    public float Value
    {
        get { return this.value; }
        set { this.Set<float>(ref this.value, value, nameof(Value)); }
    }
}

public class ProgressBarView : UIView
{
    public GameObject progressBar;
    public Text progressTip;
    public Text progressText;
    public Slider progressSlider;

    protected override void Awake()
    {
        var bindingSet = this.CreateBindingSet<ProgressBar, ProgressBarViewModel>();

        bindingSet.Bind(this.progressBar).For(v => v.activeSelf).To(vm => vm.Enabled).OneWay();
        bindingSet.Bind(this.progressTip).For(v => v.text).To(vm => vm.Tip).OneWay();
        bindingSet.Bind(this.progressText).For(v => v.text)
            .ToExpression(vm => string.Format("{0:0.00}%", vm.Value * 100)).OneWay();
        bindingSet.Bind(this.progressSlider).For(v => v.value).To(vm => vm.Value).OneWay();

        bindingSet.Build();
    }
}


IEnumerator Unzip(ProgressBarViewModel progressBar)
{
    progressBar.Tip = "Unziping";
    progressBar.Enabled = true;//Display the progress bar

    for(int i=0;i<30;i++)
    {            
        //TODO:Add unzip code here.

        progressBar.Value = (i/(float)30);            
        yield return null;
    }

    progressBar.Enabled = false;//Hide the progress bar
    progressBar.Tip = "";        
}

Tutorials and Examples

Introduction

  • Window View

  • Localization

  • Databinding

  • Variable Example

  • ListView Binding

Contact Us

Email: [email protected]
Website: https://vovgou.github.io/loxodon-framework/
QQ Group: 622321589 15034148




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
hoelzro/lua-term: Terminal operations for Lua发布时间:2022-08-16
下一篇:
rxi/flux: A fast, lightweight tweening library for Lua发布时间:2022-08-16
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap