少年修仙传客户端代码仓库
hch
2025-01-02 a0cc772e3de31fc11962a5ceec29fc58554fca09
UI/Common/UI3DModelFactory.cs
@@ -91,7 +91,7 @@
        var animator = model.GetComponent<Animator>();
        if (animator != null)
        {
            //ResetRealmBossAnimator(id, animator);
            ResetRealmBossAnimator(id, animator);
            animator.enabled = false;
        }
@@ -111,26 +111,21 @@
        }
    }
    //private static void ResetRealmBossAnimator(int _id, Animator animator)
    //{
    //    var configs = RealmConfig.GetValues();
    //    var index = configs.FindIndex((x) =>
    //    {
    //        return x.BossID == _id;
    //    });
    //    if (index != -1)
    //    {
    //        var npcConfig = NPCConfig.Get(_id);
    //        if (npcConfig != null)
    //        {
    //            var runtimeController = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix, npcConfig.MODE);
    //            if (runtimeController != null)
    //            {
    //                animator.runtimeAnimatorController = runtimeController;
    //            }
    //        }
    //    }
    //}
    private static void ResetRealmBossAnimator(int _id, Animator animator)
    {
        if (RealmLVUPTaskConfig.IsRealmBoss(_id))
        {
            var npcConfig = NPCConfig.Get(_id);
            if (npcConfig != null)
            {
                var runtimeController = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix, npcConfig.MODE);
                if (runtimeController != null)
                {
                    animator.runtimeAnimatorController = runtimeController;
                }
            }
        }
    }
    public static GameObject LoadUIHorse(int id)
    {