public uint AddCenterPosEffect(string effectKind, NkBattleChar kBattleChar, Vector3 v3CenterPos) { if (this.m_bDontMakeEffect && NrTSingleton <NkEffectManager> .Instance.isEffectLimit(effectKind)) { return(0u); } if (kBattleChar == null) { return(0u); } Nr3DCharBase nr3DCharBase = kBattleChar.Get3DChar(); if (nr3DCharBase == null) { return(0u); } EFFECT_INFO effectInfo = NrTSingleton <NkEffectManager> .Instance.GetEffectInfo(effectKind); if (effectInfo == null) { return(0u); } Transform effectPos = nr3DCharBase.GetEffectPos(effectInfo.EFFECT_POS); if (null != effectPos) { v3CenterPos.y = effectPos.position.y; } NkEffectUnit kEffectUnit = new NkEffectUnit(effectInfo, nr3DCharBase.GetRootGameObject(), v3CenterPos); return(this._AddEffect(kEffectUnit)); }
public NkEffectUnit(EFFECT_INFO effectInfo, NkBattleChar OrderChar, bool bAttachEffectPos, bool CheckScale) { GameObject gameObject = null; Nr3DCharBase nr3DCharBase = OrderChar.Get3DChar(); if (nr3DCharBase != null) { gameObject = nr3DCharBase.GetRootGameObject(); } Vector3 v3Target = Vector3.zero; Transform effectPos = nr3DCharBase.GetEffectPos(effectInfo.EFFECT_POS); if (null != effectPos) { v3Target = effectPos.position; } if (effectInfo.EFFECT_POS == eEFFECT_POS.BONE && nr3DCharBase != null) { gameObject = nr3DCharBase.GetBoneRootObject(); if (gameObject == null) { gameObject = nr3DCharBase.GetRootGameObject(); } v3Target = Vector3.zero; v3Target.y = -1f; } this.m_CasterChar = OrderChar; if (bAttachEffectPos && effectPos != null) { gameObject = effectPos.gameObject; v3Target = Vector3.zero; } this.m_CheckScale = CheckScale; this.InitBase(eEFFECT_TARGET.GAMEOBJECT, effectInfo, gameObject, v3Target); }
public NkEffectUnit(EFFECT_INFO effectInfo, NkBattleChar OrderChar) { GameObject gameObject = null; Transform transform = null; Nr3DCharBase nr3DCharBase = OrderChar.Get3DChar(); if (nr3DCharBase != null) { gameObject = nr3DCharBase.GetRootGameObject(); transform = nr3DCharBase.GetEffectPos(effectInfo.EFFECT_POS); } Vector3 v3Target = Vector3.zero; if (null != transform) { v3Target = transform.position; } if (effectInfo.EFFECT_POS == eEFFECT_POS.BONE && nr3DCharBase != null) { gameObject = nr3DCharBase.GetBoneRootObject(); if (gameObject == null) { gameObject = nr3DCharBase.GetRootGameObject(); } v3Target = Vector3.zero; v3Target.y = -1f; } this.m_CasterChar = OrderChar; this.InitBase(eEFFECT_TARGET.POSITION, effectInfo, gameObject, v3Target); }
public uint AddEffect(string effectKind, NrCharBase kCharBase) { if (kCharBase == null) { return(0u); } Nr3DCharBase nr3DCharBase = kCharBase.Get3DChar(); if (nr3DCharBase == null) { return(0u); } EFFECT_INFO effectInfo = NrTSingleton <NkEffectManager> .Instance.GetEffectInfo(effectKind); if (effectInfo == null) { return(0u); } GameObject gameObject = nr3DCharBase.GetRootGameObject(); Vector3 v3Target = Vector3.zero; Transform effectPos = nr3DCharBase.GetEffectPos(effectInfo.EFFECT_POS); if (null != effectPos) { v3Target = effectPos.position; if (effectInfo.EFFECT_POS == eEFFECT_POS.CENTERDM) { gameObject = effectPos.gameObject; } } if (effectInfo.EFFECT_POS == eEFFECT_POS.BONE) { gameObject = nr3DCharBase.GetBoneRootObject(); if (gameObject == null) { gameObject = nr3DCharBase.GetRootGameObject(); } v3Target = Vector3.zero; v3Target.y = -1f; } NkEffectUnit kEffectUnit; if (effectInfo.EFFECT_POS == eEFFECT_POS.CENTERDM) { kEffectUnit = new NkEffectUnit(effectInfo, gameObject); } else { kEffectUnit = new NkEffectUnit(effectInfo, gameObject, v3Target); } return(this._AddEffect(kEffectUnit)); }
public uint AddCasterEffect(string effectKind, NkBattleChar kBattleChar) { if (this.m_bDontMakeEffect && NrTSingleton <NkEffectManager> .Instance.isEffectLimit(effectKind)) { return(0u); } if (kBattleChar == null) { return(0u); } Nr3DCharBase nr3DCharBase = kBattleChar.Get3DChar(); if (nr3DCharBase == null) { return(0u); } Transform effectTarget = nr3DCharBase.GetEffectTarget(); if (effectTarget == null) { return(0u); } EFFECT_INFO effectInfo = NrTSingleton <NkEffectManager> .Instance.GetEffectInfo(effectKind); if (effectInfo == null) { return(0u); } GameObject goTarget = nr3DCharBase.GetRootGameObject(); Transform effectPos = nr3DCharBase.GetEffectPos(effectInfo.EFFECT_POS); if (null != effectPos && effectInfo.EFFECT_POS == eEFFECT_POS.CENTERDM) { goTarget = effectPos.gameObject; } NkEffectUnit kEffectUnit; if (effectInfo.EFFECT_POS == eEFFECT_POS.CENTERDM) { kEffectUnit = new NkEffectUnit(effectInfo, goTarget); } else { kEffectUnit = new NkEffectUnit(effectInfo, kBattleChar); } return(this._AddEffect(kEffectUnit)); }
public NkEffectUnit(EFFECT_INFO effectInfo, NkBattleChar OrderChar, Vector3 v3CenterTarget) { GameObject goParent = null; Nr3DCharBase nr3DCharBase = OrderChar.Get3DChar(); if (nr3DCharBase != null) { goParent = nr3DCharBase.GetRootGameObject(); } Transform effectPos = nr3DCharBase.GetEffectPos(effectInfo.EFFECT_POS); if (null != effectPos) { v3CenterTarget.y = effectPos.position.y; } this.m_CasterChar = OrderChar; this.InitBase(eEFFECT_TARGET.POSITION, effectInfo, goParent, v3CenterTarget); }