private void OnLoadBrithFXComplete(EffectController effect, System.Object usedata) { SpacecraftAvatarComponent component = (SpacecraftAvatarComponent)usedata; if (component != null) { component.m_Presentation.SetVisibilityOfEntireSpacecraft(true); component.m_ModelLoadCompleteInThisFrame = false; } }
/// <summary> /// 连线特效回调函数 /// </summary> /// <param name="obj"></param> private void OnLineEffectLoad(EffectController effect, System.Object usedata) { if (usedata != null) { SpacecraftAvatarComponent component = (SpacecraftAvatarComponent)usedata; uint ownerHeroID = component.m_Property.GetOwner().m_EntityFatherOwnerID; if (ownerHeroID != 0 && component.m_Property.GetHeroType() == KHeroType.htDisturbor) { SpacecraftEntity target = component.m_GameplayProxy.GetEntityById <SpacecraftEntity>(ownerHeroID) as SpacecraftEntity; effect.SetBeamTarget(component.m_Property.GetSkinTransform(), target.GetSkinTransform(), Vector3.zero, false, target.GetAllColliders()); /// TODO. /// 时间配合特效里的动画时间 UIManager.Instance.StartCoroutine(Excute(0.25f, () => { target.SendEvent(ComponentEventName.LineEffectEnd, null); })); } } }