少年修仙传客户端代码仓库
lwb
2021-02-24 aaa5ff3342f4371f6ddc86e047fe0de34dbd5f1f
9527 ilruntime
3个文件已修改
60 ■■■■■ 已修改文件
Core/GameEngine/DataToCtl/PackageRegedit.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/GameNetSystem.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Pet/PetWin.cs 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/DataToCtl/PackageRegedit.cs
@@ -629,11 +629,13 @@
    {
        try
        {
            DebugEx.LogFormat("Distribute:{0}", _package.cmd);
            if (_package is LuaGameNetPack)
                //执行lua的封包
                CSharpCallLua.OnRecieveLuaNetPackage(_package as LuaGameNetPack);
            else if (_package is GameNetPackBasicAdapter.Adapter)
            {
                DebugEx.LogFormat("执行IL封包:{0}", _package.cmd);
                //执行IL热更工程的封包
                if (ilPackToBusinessTable.ContainsKey(_package.cmd))
                    ilPackToBusinessTable[_package.cmd].Done(_package);
Core/NetworkPackage/GameNetSystem.cs
@@ -16,9 +16,11 @@
    DisconnectState disconnectState;
    NetState m_NetState;
    public NetState netState {
    public NetState netState
    {
        get { return this.m_NetState; }
        set {
        set
        {
            if (this.m_NetState != value)
            {
                switch (m_NetState)
@@ -72,7 +74,8 @@
    private ClientSocket mainSocket;
    public bool mainSocketConnected { get { return mainSocket == null ? false : mainSocket.connected; } }
    public float timeSinceMainSocketLastProtocol {
    public float timeSinceMainSocketLastProtocol
    {
        get { return mainSocket == null ? Time.time : (float)(DateTime.Now - mainSocket.lastPackageTime).TotalSeconds; }
    }
@@ -80,7 +83,8 @@
    private ClientSocket crossServerSocket;
    public bool crossServerSocketConnected { get { return crossServerConnected_Loigc && (crossServerSocket == null ? false : crossServerSocket.connected); } }
    public float timeSinceCrossServerSocketLastProtocol {
    public float timeSinceCrossServerSocketLastProtocol
    {
        get { return crossServerSocket == null ? Time.time : (float)(DateTime.Now - crossServerSocket.lastPackageTime).TotalSeconds; }
    }
@@ -203,7 +207,7 @@
                return;
            }
            if (PackageRegedit.Contain(protocol.cmd) || PackageRegedit.ContainLua(protocol.cmd))
            if (PackageRegedit.Contain(protocol.cmd) || PackageRegedit.ContainLua(protocol.cmd) || PackageRegedit.ContainIL(protocol.cmd))
            {
                switch (type)
                {
@@ -221,7 +225,7 @@
            }
            else
            {
                DebugEx.LogWarningFormat("数据包(cmd:{0})未登记!", protocol.cmd);
                DebugEx.LogErrorFormat("数据包(cmd:{0})未登记!", protocol.cmd);
            }
        }
    }
System/Pet/PetWin.cs
@@ -15,23 +15,23 @@
        protected override void BindController()
        {
            m_TitleIcon = this.GetComponent<Image>("Pivot/Container_BackGround/Img_Title");
            m_Group = this.GetComponent<FunctionButtonGroup>("Pivot/Container_Functions");
            m_Left = this.GetComponent<Button>("Pivot/Container_Buttons/Btn_Left");
            m_Right = this.GetComponent<Button>("Pivot/Container_Buttons/Btn_Right");
            m_Close = this.GetComponent<Button>("Pivot/Container_Buttons/Btn_Close");
            m_SubWindowContainer = this.GetComponent<RectTransform>("Pivot/Container_SubWindow");
            var name = this.GetType().Name;
            var infos = WindowConfig.GetWindowFunctionInfos(name);
            foreach (var info in infos)
            {
            m_TitleIcon = this.GetComponent<Image>("Pivot/Container_BackGround/Img_Title");
            m_Group = this.GetComponent<FunctionButtonGroup>("Pivot/Container_Functions");
            m_Left = this.GetComponent<Button>("Pivot/Container_Buttons/Btn_Left");
            m_Right = this.GetComponent<Button>("Pivot/Container_Buttons/Btn_Right");
            m_Close = this.GetComponent<Button>("Pivot/Container_Buttons/Btn_Close");
            m_SubWindowContainer = this.GetComponent<RectTransform>("Pivot/Container_SubWindow");
            var name = this.GetType().Name;
            var infos = WindowConfig.GetWindowFunctionInfos(name);
            foreach (var info in infos)
            {
                m_FunctionButtons.Add(info.order,
                    m_Group.AddFunction("FunctionButton_Pattern_1", info.order, info.functionId, Language.Get(info.titleKey), info.redPointId));
            }
            m_TitleIcon.SetSprite(WindowConfig.GetTitleIconKey(name));
                    m_Group.AddFunction("FunctionButton_Pattern_1", info.order, info.functionId, Language.Get(info.titleKey), info.redPointId));
            }
            m_TitleIcon.SetSprite(WindowConfig.GetTitleIconKey(name));
            m_TitleIcon.SetNativeSize();
        }
@@ -73,10 +73,14 @@
        private void DisplayButtons()
        {
            var petHorseAwaking = LuaUtility.Global.Get<IPetHorseAwaking>("PetHorseAwakingModel");
            if (petHorseAwaking != null)
            var type = ILLauncherProxy.Instance.appdomain.LoadedTypes["PetHorseAwakingModel"];
            var get_Instance = type.GetMethod("get_Instance", 0);
            var isOpenM = type.GetMethod("IsOpen", 0);
            var instance = ILLauncherProxy.Instance.appdomain.Invoke(get_Instance, null);
            // var petHorseAwaking = LuaUtility.Global.Get<IPetHorseAwaking>("PetHorseAwakingModel");
            if (instance != null)
            {
                var isOpen = petHorseAwaking.IsOpen();
                var isOpen = (bool)ILLauncherProxy.Instance.appdomain.Invoke(isOpenM, instance);
                m_FunctionButtons[2].gameObject.SetActive(isOpen);
                m_FunctionButtons[2].state = isOpen ? TitleBtnState.Normal : TitleBtnState.Locked;
            }