/// <summary> /// 移除连线特效 /// </summary> private void RemoveLineEffect() { if (m_LineFxInstance != null) { VFXController vfxController = m_LineFxInstance.GetEffectObject(); Animator animator = vfxController.GetComponentInChildren <Animator>(); if (animator) { animator.SetTrigger("dissolve"); } } }
/// <summary> /// 改变隐身特效状态 /// </summary> private void ChangeHideEffectState() { VFXController vfxController = m_HideFxInstance.GetEffectObject(); Animator animator = vfxController.GetComponentInChildren <Animator>(); if (animator) { animator.SetTrigger("Materialized"); } if (m_EnergyBodyFxInstance) { StopEnergyEffect(); } }
/// <summary> /// 调整描边特效颜色 /// </summary> private void AdjustOutlineEffectColor() { if (m_Property != null && m_Property.GetHeroType() == KHeroType.htMine) { if (m_OutlineVFX != null) { VFXController effectObject = m_OutlineVFX.GetEffectObject(); if (effectObject) { Animator animator = effectObject.GetComponent <Animator>(); if (animator) { float hp = (float)m_Property.GetOwner().GetAttribute(AttributeName.kHP); float hpMax = (float)m_Property.GetOwner().GetAttribute(AttributeName.kHPMax); float hpProgress = hpMax <= 0 ? 0 : hp / hpMax; animator.SetFloat("Color", 0); } } } } }