Пример #1
0
        private void AddEquipFX(uint fxId)
        {
            Debug.LogError("@@@@@@@@AddEquipFX " + fxId);

            if (vocation != Vocation.Warrior)
            {
                return;
            }

            if (fxId == m_oldEquipFXID)
            {
                return;
            }

            int fxResId = EquipSpecialEffectData.dataMap[(int)fxId].fxid;

            m_oldEquipFXID = loadedEquipId;

            if (fxId != 0)
            {
                AssetCacheMgr.GetResource("equip_warrior_01_fx_5_mat.mat", (obj) =>
                {
                    Debug.LogError(fxId + " @@@@@@@@@@@@@@@");
                    Material fxMat = (Material)obj;
                    GameObject.transform.FindChild("101_00").GetComponentsInChildren <SkinnedMeshRenderer>(true)[0].material = null;
                    GameObject.transform.FindChild("101_00").GetComponentsInChildren <SkinnedMeshRenderer>(true)[0].material = fxMat;
                    UVAnim anim      = GameObject.transform.FindChild("101_00").gameObject.AddComponent <UVAnim>();
                    anim.Direction.x = 0.5f;
                    anim.Direction.y = 0.13f;
                    anim.speed       = 1.5f;
                });
            }
            else
            {
                //AssetCacheMgr.GetResource(Actor.EquipOnDic, (obj) =>
                //{
                //    Debug.LogError(fxId + " @@@@@@@@@@@@@@@");
                //    Material fxMat = (Material)obj;
                //    GameObject.transform.FindChild("101_00").GetComponentsInChildren<SkinnedMeshRenderer>(true)[0].material = null;
                //    GameObject.transform.FindChild("101_00").GetComponentsInChildren<SkinnedMeshRenderer>(true)[0].material = fxMat;
                //    UVAnim anim = GameObject.transform.FindChild("101_00").gameObject.AddComponent<UVAnim>();
                //    anim.Direction.x = 0.5f;
                //    anim.Direction.y = 0.13f;
                //    anim.speed = 1.5f;

                //});
            }
        }
Пример #2
0
        private void AddJewelFX(uint fxId)
        {
            //Debug.Log("@@@@@@@@AddJewelFX(" + fxId+")");

            if (vocation != Vocation.Warrior)
            {
                return;
            }

            if (fxId == m_oldJewelFXID)
            {
                return;
            }

            int fxResId = EquipSpecialEffectData.dataMap[(int)fxId].fxid;

            m_oldJewelFXID = loadedJewelId;

            if (fxId != 0)
            {
                AssetCacheMgr.GetResource("blade_01_fx_6_mat.mat", (obj) =>
                {
                    Material fxMat = (Material)obj;

                    System.Collections.Generic.List <GameObject> listGo = GameObject.GetComponent <ActorParent>().WeaponObj;
                    for (int i = 0; i < listGo.Count; ++i)
                    {
                        int index = i;
                        listGo[index].GetComponentsInChildren <MeshRenderer>(true)[0].material = null;
                        listGo[index].GetComponentsInChildren <MeshRenderer>(true)[0].material = fxMat;
                        UVAnim anim      = listGo[index].AddComponent <UVAnim>();
                        anim.Direction.x = 0.5f;
                        anim.Direction.y = 0.13f;
                        anim.speed       = 1.5f;
                    }
                });
            }
            else
            {
            }
        }