少年修仙传客户端基础资源
lwb
2021-02-22 22f7c52624b2fd9632a2d2bf0455d8352a825f3b
9527 ilruntime
4个文件已修改
171 ■■■■ 已修改文件
Assets/ILRuntime/Src/ILBehaviourProxy.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/ILRuntime/Src/ILLauncherProxy.cs 155 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/ILRuntime/Src/ILOneLevelWindowProxy.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/ILRuntime/Src/ILWindowProxy.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/ILRuntime/Src/ILBehaviourProxy.cs
@@ -16,7 +16,7 @@
    Dictionary<string, ILBehaviourHolder> ilBehaviourHolders = new Dictionary<string, ILBehaviourHolder>();
    AppDomain appDomain
    {
        get { return ILLauncherProxy.Instance.appDomain; }
        get { return ILLauncherProxy.Instance.appdomain; }
    }
    private void Init()
Assets/ILRuntime/Src/ILLauncherProxy.cs
@@ -14,7 +14,7 @@
    private ILRuntime.Runtime.Enviorment.AppDomain _appdomain;
    public ILRuntime.Runtime.Enviorment.AppDomain appDomain
    public ILRuntime.Runtime.Enviorment.AppDomain appdomain
    {
        get
        {
@@ -47,7 +47,7 @@
        if (type != null)
        {
            var m = type.GetMethod("Initialize");
            m.Invoke(null, new object[] { appDomain });
            m.Invoke(null, new object[] { appdomain });
        }
#else
        ILRuntime.Runtime.Generated.CLRBindings.Initialize(_appdomain);
@@ -84,103 +84,112 @@
    //注册跨域继承适配器
    private void RegisterCrossBindingAdaptor()
    {
        appDomain.RegisterCrossBindingAdaptor(new CoroutineAdapter());
        appDomain.RegisterCrossBindingAdaptor(new DtcBasicAdapter());
        appDomain.RegisterCrossBindingAdaptor(new GameNetPackBasicAdapter());
        appdomain.RegisterCrossBindingAdaptor(new CoroutineAdapter());
        appdomain.RegisterCrossBindingAdaptor(new DtcBasicAdapter());
        appdomain.RegisterCrossBindingAdaptor(new GameNetPackBasicAdapter());
    }
    //注册值类型绑定
    private void RegisterValueTypeBinder()
    {
        appDomain.RegisterValueTypeBinder(typeof(Vector3), new Vector3Binder());
        appDomain.RegisterValueTypeBinder(typeof(Quaternion), new QuaternionBinder());
        appDomain.RegisterValueTypeBinder(typeof(Vector2), new Vector2Binder());
        appdomain.RegisterValueTypeBinder(typeof(Vector3), new Vector3Binder());
        appdomain.RegisterValueTypeBinder(typeof(Quaternion), new QuaternionBinder());
        appdomain.RegisterValueTypeBinder(typeof(Vector2), new Vector2Binder());
    }
    //注册委托
    private void RegisterDelegate()
    {
        //无返回值
        appDomain.DelegateManager.RegisterMethodDelegate<int>();
        appDomain.DelegateManager.RegisterMethodDelegate<long>();
        appDomain.DelegateManager.RegisterMethodDelegate<string>();
        appDomain.DelegateManager.RegisterMethodDelegate<float>();
        appDomain.DelegateManager.RegisterMethodDelegate<double>();
        appDomain.DelegateManager.RegisterMethodDelegate<bool>();
        appDomain.DelegateManager.RegisterMethodDelegate<byte[]>();
        appDomain.DelegateManager.RegisterMethodDelegate<bool, bool>();
        appDomain.DelegateManager.RegisterMethodDelegate<bool, string>();
        appDomain.DelegateManager.RegisterMethodDelegate<int, string>();
        appDomain.DelegateManager.RegisterMethodDelegate<int, float>();
        appDomain.DelegateManager.RegisterMethodDelegate<string, int>();
        appDomain.DelegateManager.RegisterMethodDelegate<int, bool, string>();
        appDomain.DelegateManager.RegisterMethodDelegate<int, int>();
        appDomain.DelegateManager.RegisterMethodDelegate<int, bool>();
        appDomain.DelegateManager.RegisterMethodDelegate<bool, int>();
        appDomain.DelegateManager.RegisterMethodDelegate<ulong>();
        appDomain.DelegateManager.RegisterMethodDelegate<uint>();
        appDomain.DelegateManager.RegisterMethodDelegate<Snxxz.UI.Operation>();
        appDomain.DelegateManager.RegisterMethodDelegate<float, Vector2>();
        appDomain.DelegateManager.RegisterMethodDelegate<int, Transform>();
        appDomain.DelegateManager.RegisterMethodDelegate<Vector2>();
        appDomain.DelegateManager.RegisterMethodDelegate<Vector3>();
        appDomain.DelegateManager.RegisterMethodDelegate<Transform>();
        appDomain.DelegateManager.RegisterMethodDelegate<GameObject>();
        appDomain.DelegateManager.RegisterMethodDelegate<Component>();
        appDomain.DelegateManager.RegisterMethodDelegate<E_AttackMode>();
        appDomain.DelegateManager.RegisterMethodDelegate<PlayerDataType>();
        appDomain.DelegateManager.RegisterMethodDelegate<PlayerDataType, int>();
        appDomain.DelegateManager.RegisterMethodDelegate<List<Vector3>>();
        appDomain.DelegateManager.RegisterMethodDelegate<ChatData>();
        appDomain.DelegateManager.RegisterMethodDelegate<VoiceHttpRequest.VoiceDecodec>();
        appDomain.DelegateManager.RegisterMethodDelegate<Snxxz.UI.ComposeMatCell, NeedMatType>();
        appDomain.DelegateManager.RegisterMethodDelegate<ItemCompoundConfig, int>();
        appDomain.DelegateManager.RegisterMethodDelegate<Snxxz.UI.ComposeMatCell, int, SelectItemType>();
        appDomain.DelegateManager.RegisterMethodDelegate<GroupType, bool>();
        appDomain.DelegateManager.RegisterMethodDelegate<PackType, int>();
        appDomain.DelegateManager.RegisterMethodDelegate<PackType, string>();
        appDomain.DelegateManager.RegisterMethodDelegate<PackType, int, int>();
        appDomain.DelegateManager.RegisterMethodDelegate<SystemSwitch, bool>();
        appDomain.DelegateManager.RegisterMethodDelegate<ChatBoolType, bool>();
        appDomain.DelegateManager.RegisterMethodDelegate<E_NpcType, int, uint>();
        appDomain.DelegateManager.RegisterMethodDelegate<TeamInviteType>();
        appDomain.DelegateManager.RegisterMethodDelegate<Snxxz.UI.PlayerDetails.DetailType>();
        appDomain.DelegateManager.RegisterMethodDelegate<FunctionUnlockType>();
        appDomain.DelegateManager.RegisterMethodDelegate<TreasureCategory>();
        appDomain.DelegateManager.RegisterMethodDelegate<Window>();
        appDomain.DelegateManager.RegisterMethodDelegate<TimeMgr.SyntonyType>();
        appDomain.DelegateManager.RegisterMethodDelegate<DateTime>();
        appDomain.DelegateManager.RegisterMethodDelegate<System.Object>();
        appdomain.DelegateManager.RegisterMethodDelegate<int>();
        appdomain.DelegateManager.RegisterMethodDelegate<long>();
        appdomain.DelegateManager.RegisterMethodDelegate<string>();
        appdomain.DelegateManager.RegisterMethodDelegate<float>();
        appdomain.DelegateManager.RegisterMethodDelegate<double>();
        appdomain.DelegateManager.RegisterMethodDelegate<bool>();
        appdomain.DelegateManager.RegisterMethodDelegate<byte[]>();
        appdomain.DelegateManager.RegisterMethodDelegate<bool, bool>();
        appdomain.DelegateManager.RegisterMethodDelegate<bool, string>();
        appdomain.DelegateManager.RegisterMethodDelegate<int, string>();
        appdomain.DelegateManager.RegisterMethodDelegate<int, float>();
        appdomain.DelegateManager.RegisterMethodDelegate<string, int>();
        appdomain.DelegateManager.RegisterMethodDelegate<int, bool, string>();
        appdomain.DelegateManager.RegisterMethodDelegate<int, int>();
        appdomain.DelegateManager.RegisterMethodDelegate<int, bool>();
        appdomain.DelegateManager.RegisterMethodDelegate<bool, int>();
        appdomain.DelegateManager.RegisterMethodDelegate<ulong>();
        appdomain.DelegateManager.RegisterMethodDelegate<uint>();
        appdomain.DelegateManager.RegisterMethodDelegate<Snxxz.UI.Operation>();
        appdomain.DelegateManager.RegisterMethodDelegate<float, Vector2>();
        appdomain.DelegateManager.RegisterMethodDelegate<int, Transform>();
        appdomain.DelegateManager.RegisterMethodDelegate<Vector2>();
        appdomain.DelegateManager.RegisterMethodDelegate<Vector3>();
        appdomain.DelegateManager.RegisterMethodDelegate<Transform>();
        appdomain.DelegateManager.RegisterMethodDelegate<GameObject>();
        appdomain.DelegateManager.RegisterMethodDelegate<Component>();
        appdomain.DelegateManager.RegisterMethodDelegate<E_AttackMode>();
        appdomain.DelegateManager.RegisterMethodDelegate<PlayerDataType>();
        appdomain.DelegateManager.RegisterMethodDelegate<PlayerDataType, int>();
        appdomain.DelegateManager.RegisterMethodDelegate<List<Vector3>>();
        appdomain.DelegateManager.RegisterMethodDelegate<ChatData>();
        appdomain.DelegateManager.RegisterMethodDelegate<VoiceHttpRequest.VoiceDecodec>();
        appdomain.DelegateManager.RegisterMethodDelegate<Snxxz.UI.ComposeMatCell, NeedMatType>();
        appdomain.DelegateManager.RegisterMethodDelegate<ItemCompoundConfig, int>();
        appdomain.DelegateManager.RegisterMethodDelegate<Snxxz.UI.ComposeMatCell, int, SelectItemType>();
        appdomain.DelegateManager.RegisterMethodDelegate<GroupType, bool>();
        appdomain.DelegateManager.RegisterMethodDelegate<PackType, int>();
        appdomain.DelegateManager.RegisterMethodDelegate<PackType, string>();
        appdomain.DelegateManager.RegisterMethodDelegate<PackType, int, int>();
        appdomain.DelegateManager.RegisterMethodDelegate<SystemSwitch, bool>();
        appdomain.DelegateManager.RegisterMethodDelegate<ChatBoolType, bool>();
        appdomain.DelegateManager.RegisterMethodDelegate<E_NpcType, int, uint>();
        appdomain.DelegateManager.RegisterMethodDelegate<TeamInviteType>();
        appdomain.DelegateManager.RegisterMethodDelegate<Snxxz.UI.PlayerDetails.DetailType>();
        appdomain.DelegateManager.RegisterMethodDelegate<FunctionUnlockType>();
        appdomain.DelegateManager.RegisterMethodDelegate<TreasureCategory>();
        appdomain.DelegateManager.RegisterMethodDelegate<Window>();
        appdomain.DelegateManager.RegisterMethodDelegate<TimeMgr.SyntonyType>();
        appdomain.DelegateManager.RegisterMethodDelegate<DateTime>();
        appdomain.DelegateManager.RegisterMethodDelegate<System.Object>();
        appdomain.DelegateManager.RegisterMethodDelegate<global::ScrollerDataType, global::CellView>();
        //有返回值
        appDomain.DelegateManager.RegisterFunctionDelegate<int>();
        appDomain.DelegateManager.RegisterFunctionDelegate<bool>();
        appDomain.DelegateManager.RegisterFunctionDelegate<long>();
        appDomain.DelegateManager.RegisterFunctionDelegate<string>();
        appDomain.DelegateManager.RegisterFunctionDelegate<float>();
        appDomain.DelegateManager.RegisterFunctionDelegate<double>();
        appDomain.DelegateManager.RegisterFunctionDelegate<int, bool>();
        appDomain.DelegateManager.RegisterFunctionDelegate<System.Int32, System.Int32, System.Int32>();
        appdomain.DelegateManager.RegisterFunctionDelegate<int>();
        appdomain.DelegateManager.RegisterFunctionDelegate<bool>();
        appdomain.DelegateManager.RegisterFunctionDelegate<long>();
        appdomain.DelegateManager.RegisterFunctionDelegate<string>();
        appdomain.DelegateManager.RegisterFunctionDelegate<float>();
        appdomain.DelegateManager.RegisterFunctionDelegate<double>();
        appdomain.DelegateManager.RegisterFunctionDelegate<int, bool>();
        appdomain.DelegateManager.RegisterFunctionDelegate<System.Int32, System.Int32, System.Int32>();
        appDomain.DelegateManager.RegisterDelegateConvertor<UnityEngine.Events.UnityAction>((action) =>
        //自定义委托转换
        appdomain.DelegateManager.RegisterDelegateConvertor<UnityEngine.Events.UnityAction>((action) =>
        {
            return new UnityEngine.Events.UnityAction(() =>
            {
                ((System.Action)action)();
            });
        });
        appDomain.DelegateManager.RegisterDelegateConvertor<System.Threading.WaitCallback>((act) =>
        appdomain.DelegateManager.RegisterDelegateConvertor<System.Threading.WaitCallback>((act) =>
        {
            return new System.Threading.WaitCallback((state) =>
             {
                 ((Action<System.Object>)act)(state);
             });
        });
        appDomain.DelegateManager.RegisterDelegateConvertor<System.Comparison<System.Int32>>((act) =>
        appdomain.DelegateManager.RegisterDelegateConvertor<System.Comparison<System.Int32>>((act) =>
        {
            return new System.Comparison<System.Int32>((x, y) =>
            {
                return ((Func<System.Int32, System.Int32, System.Int32>)act)(x, y);
            });
        });
        appdomain.DelegateManager.RegisterDelegateConvertor<global::ScrollerController.OnRefreshCellDelegate>((act) =>
        {
            return new global::ScrollerController.OnRefreshCellDelegate((type, cell) =>
            {
                ((Action<global::ScrollerDataType, global::CellView>)act)(type, cell);
            });
        });
    }
@@ -190,7 +199,7 @@
#if UNITY_EDITOR
        _appdomain.DebugService.StartDebugService(56000);
#endif
        launcherInstance = appDomain.Instantiate("LogicLauncher");
        launcherInstance = appdomain.Instantiate("LogicLauncher");
        var type = launcherInstance.Type;
        update = type.GetMethod("Update");
        onDestroy = type.GetMethod("OnDestroy", 0);
@@ -201,7 +210,7 @@
    private void Update()
    {
        if (update != null)
            appDomain.Invoke(update, launcherInstance);
            appdomain.Invoke(update, launcherInstance);
    }
    protected override void OnDestroy()
@@ -209,14 +218,14 @@
        base.OnDestroy();
        if (onDestroy != null)
            appDomain.Invoke(onDestroy, launcherInstance);
            appdomain.Invoke(onDestroy, launcherInstance);
#if UNITY_EDITOR
        var type = Type.GetType("ILRuntime.Runtime.Generated.CLRBindings");
        if (type != null)
        {
            var m = type.GetMethod("Shutdown");
            m.Invoke(null, new object[] { appDomain });
            m.Invoke(null, new object[] { appdomain });
        }
#else
        ILRuntime.Runtime.Generated.CLRBindings.Shutdown(appDomain);
Assets/ILRuntime/Src/ILOneLevelWindowProxy.cs
@@ -16,14 +16,14 @@
    IMethod dipose;
    AppDomain appDomain
    {
        get { return ILLauncherProxy.Instance.appDomain; }
        get { return ILLauncherProxy.Instance.appdomain; }
    }
    private void Init()
    {
        InitWidgts();
        //使用与预制同名的代码文件
        var windowName = gameObject.name;
        var baseType = appDomain.LoadedTypes["BaseILWindow"];
        var baseType = appDomain.LoadedTypes["ILOneLevelWindow"];
        obj = appDomain.Instantiate(windowName);
        if (obj == null)
        {
@@ -58,44 +58,52 @@
    protected override void OnActived()
    {
        base.OnActived();
        if (onActived != null)
            appDomain.Invoke(onActived, obj);
    }
    protected override void LateUpdate()
    {
        base.LateUpdate();
        if (lateUpdate != null)
            appDomain.Invoke(lateUpdate, obj);
    }
    protected override void BindController()
    {
        base.BindController();
        Init();
        if (bindController != null)
            appDomain.Invoke(bindController, obj);
    }
    protected override void AddListeners()
    {
        base.AddListeners();
        if (addListeners != null)
            appDomain.Invoke(addListeners, obj);
    }
    protected override void OnPreOpen()
    {
        base.OnPreOpen();
        if (onPreOpen != null)
            appDomain.Invoke(onPreOpen, obj);
    }
    protected override void OnAfterOpen()
    {
        base.OnAfterOpen();
        if (onAfterOpen != null)
            appDomain.Invoke(onAfterOpen, obj);
    }
    protected override void OnPreClose()
    {
        base.OnPreClose();
        if (onPreClose != null)
            appDomain.Invoke(onPreClose, obj);
    }
    protected override void OnAfterClose()
    {
        base.OnAfterClose();
        if (onAfterClose != null)
            appDomain.Invoke(onAfterClose, obj);
    }
Assets/ILRuntime/Src/ILWindowProxy.cs
@@ -15,7 +15,7 @@
    IMethod dipose;
    AppDomain appDomain
    {
        get { return ILLauncherProxy.Instance.appDomain; }
        get { return ILLauncherProxy.Instance.appdomain; }
    }
    private void Init()
    {