private void SetVisible_Impl(bool bVisible, SkinInstance si) { if (!SkinInstance.isNullOrEmpry(si)) { si.SetVisible(bVisible); si.SetBindEffectEnabled(bVisible); } }
public static void DisableSkinInstance(SkinInstance instance) { if (null == instance) { return; } if (!instance.isValid) { return; } Skin sk = null; m_SkinMap.TryGetValue(instance.nSkinID, out sk); sk.ApplyOrginalData(instance); if (instance.playEntityStaticEffect) { instance.playEntityStaticEffect.Stop(); } if (instance.switchEffectWithHeroDistance) { instance.switchEffectWithHeroDistance.DisableAll(); } instance.SkinObj.SetActive(false); instance.SetVisible(true); //重置可见性 instance.SetBindEffectEnabled(false); //重置绑定特效 BipedIKAnimator anc = instance.SkinObj.GetComponent <BipedIKAnimator>(); if (anc != null) { if (anc.goA != null) { anc.goA.SetActive(false); } if (anc.goB != null) { anc.goB.SetActive(false); } } }