public void OnCreate(CEffect owner, string id) { this.owner = owner; this.OnCreate(this.owner.battle, id); ParticleSystem[] pss = this.root.GetComponentsInChildren <ParticleSystem>(); float maxLength = 0f; ParticleSystem maxPs = null; int count = pss.Length; for (int i = 0; i < count; i++) { ParticleSystem ps = pss[i]; ParticleSystem.MinMaxCurve lifetime = ps.main.startLifetime; float len = Mathf.Max(ps.main.duration, lifetime.constantMax, lifetime.constant, lifetime.curveMax?.length ?? 0, lifetime.curve?.length ?? 0); if (len <= maxLength) { continue; } maxLength = len; maxPs = ps; } if (maxPs != null) { this.particleScript = maxPs.gameObject.AddComponent <ParticleScript>(); } }
private bool LoadAnchorData(XmlNode oAnchorsNode) { string sErrorMsg = "Não existem efeitos cadastrados."; if (oAnchorsNode == null) { MessageBox.Show(sErrorMsg, "Erro", MessageBoxButtons.OK, MessageBoxIcon.Error); return(false); } try { int iEffectId = 1; foreach (XmlNode oNode in oAnchorsNode) { if (oNode.Name == "effect") { CEffect oEffect = new CEffect(iEffectId, oNode); m_htEffects.Add(iEffectId, oEffect); iEffectId++; } } } catch { MessageBox.Show("Erro ao carregar efeitos.", "Erro", MessageBoxButtons.OK, MessageBoxIcon.Error); return(false); } return(true); }
public CEffect DoPlayEffect(string strEffect, Transform pTransParents, Vector3 vecPos) { CEffect pEffect = instance.DoPop(strEffect); pEffect.DoPlayEffect(pTransParents, vecPos); return(pEffect); }
public CEffect DoPlayEffect(string strEffectName, Vector3 vecPos) { CEffect pEffect = _pManagerPooling.DoPop(strEffectName); pEffect.DoPlayEffect(vecPos); return(pEffect); }
public CEffect DoPlayEffect(string strEffect, Vector3 vecPos, Vector3 vecRot) { CEffect pEffect = instance.DoPop(strEffect); pEffect.transform.rotation = Quaternion.LookRotation(vecRot); pEffect.DoPlayEffect(vecPos); return(pEffect); }
private void PEffectPlaying_p_Event_Effect_OnDisable(CEffect obj) { p_listEvent_FinishEffect.Invoke(); _pEffectPlaying = null; if (p_bDisableObject_OnFinishEffect) { gameObject.SetActive(false); } }
public void DoFire_Weapon(Vector3 vecDirection) { Cooltime_Remain = Cooltime; CManagerSound.instance.DoPlaySoundEffect_OrNull(ShootClip); if (VisualEffect != null) { CEffect pEffect = CManagerEffect.instance.DoPlayEffect(VisualEffect.name, transform.position); pEffect.transform.forward = vecDirection; } }
public CEffect DoPlayEffect(string strEffectEvent, Vector3 vecPos, Quaternion rotRotation) { CEffect pEffect = DoPlayEffect(strEffectEvent); if (pEffect != null) { pEffect.transform.position = vecPos; pEffect.transform.rotation = rotRotation; } return(pEffect); }
private CEffect PlayEffect(CEffect pEffectPlay) { if (pEffectPlay == null) { return(null); } _pEffectPlaying = CManagerEffect.instance.DoPlayEffect(pEffectPlay.name, transform.position + _vecEffectPos_Offset); _pEffectPlaying.p_Event_Effect_OnDisable += PEffectPlaying_p_Event_Effect_OnDisable; return(_pEffectPlaying); }
private CEffect PlayEffect(CEffect pEffectPlay, Transform pTransform) { if (pEffectPlay == null) { return(null); } _pEffectPlaying = CManagerEffect.instance.DoPlayEffect(pEffectPlay.name, pTransform.position, pTransform.rotation); _pEffectPlaying.p_Event_Effect_OnDisable += PEffectPlaying_p_Event_Effect_OnDisable; _pEffectPlaying.transform.SetParent(pTransform); return(_pEffectPlaying); }
public CEffect DoPlayEffect(string strEffectName, Vector3 vecPos) { if (_bIsQuitApplication) { return(null); } CEffect pEffect = _pManagerPooling.DoPop(strEffectName); pEffect.DoPlayEffect(vecPos); return(pEffect); }
public CEffect DoPlayEffect(string strEffect, Transform pTransParents, Vector3 vecPos) { if (_bIsQuitApplication) { return(null); } CEffect pEffect = instance.DoPop(strEffect); pEffect.DoPlayEffect(pTransParents, vecPos); return(pEffect); }
//----------------------------------------------------------------- public void CreateEffect(float x, float y) { if (mExpEffect == null) { return; } GameObject obj = Instantiate(mExpEffect); CEffect effect = obj.GetComponent <CEffect>(); effect.SetPos(x, y); }
public CEffect DoPlayEffect(string strEffect, Vector3 vecPos, Vector3 vecRot) { if (_bIsQuitApplication) { return(null); } CEffect pEffect = instance.DoPop(strEffect); pEffect.transform.rotation = Quaternion.LookRotation(vecRot); pEffect.DoPlayEffect(vecPos); return(pEffect); }
private string LoadEffectData(string sLineNodeText) { if (sLineNodeText == "") { return(""); } CEffect oEffect = new CEffect(sLineNodeText); if (oEffect.PositionOfEffect.Count != 0) { m_htEffects.Add(m_iLineId, oEffect); } return(oEffect.LineWithoutEffect); }
public CEffect DoPlayEffect(string strEffectEvent, Vector3 vecPos) { if (CheckDebugFilter(EDebugFilter.Debug_Level_Core)) { Debug.Log(ConsoleProWrapper.ConvertLog_ToCore(" DoPlayEffect - " + strEffectEvent + " Is Contain : " + _mapEffectPlayInfo.ContainsKey(strEffectEvent)), this); return(null); } CEffect pEffect = DoPlayEffect(strEffectEvent); if (pEffect != null) { pEffect.transform.position = vecPos; } return(pEffect); }
// ========================================================================== // /* public - [Do] Function * 외부 객체가 호출(For External class call)*/ /* public - [Event] Function * 프랜드 객체가 호출(For Friend class call)*/ // ========================================================================== // #region Protected /* protected - [abstract & virtual] */ /* protected - [Event] Function * 자식 객체가 호출(For Child class call) */ /* protected - Override & Unity API */ protected override void OnPlayEventMain() { base.OnPlayEventMain(); if (_bIsDisableEffectPlayed_When_EffectPlaying && _pEffectPlaying) { _pEffectPlaying.gameObject.SetActive(false); } if (_arrEffectPlay == null || _arrEffectPlay.Length == 0) { Debug.LogError(name + "이펙트 플레이어인데 이펙트할게 없습니다.", this); return; } CEffect pRandomEffect = _arrEffectPlay.GetRandom(); _pEffectPlaying = CManagerEffect.instance.DoPlayEffect(pRandomEffect.name, transform.position); _pEffectPlaying.p_Event_Effect_OnDisable += PEffectPlaying_p_Event_Effect_OnDisable; }
private void PEffectPlaying_p_Event_Effect_OnDisable(CEffect obj) { p_listEvent_FinishEffect.Invoke(); _pEffectPlaying = null; }
private void Arg2_p_Event_Effect_OnDisable(CEffect obj) { _pManagerPooling.DoPush(obj); }
// ========================================================================== // /* private - [Proc] Function * 중요 로직을 처리 */ /* private - Other[Find, Calculate] Func * 찾기, 계산 등의 비교적 단순 로직 */ private void _pManagerPooling_p_EVENT_OnPopResource(string arg1, CEffect arg2) { arg2._strEffectName = arg1; arg2.p_Event_Effect_OnDisable += Arg2_p_Event_Effect_OnDisable;; }