// public void SetMoveInfo(eHitMoveType _moveType, float _moveDistance) // { // m_MoveType = _moveType; // m_MoveDistance = _moveDistance; // } public void SetHitInfo(Tbl_Action_HitInfo _hitInfo) { m_hitInfo = _hitInfo; }
bool PlayPotency(Tbl_Action_HitInfo _hitInfo, int _idx, eDAMAGETYPE _type, Tbl_SkillLevel_Potency _lvPotency) { return PlayPotency(null, _hitInfo, _idx, _type, _lvPotency); }
bool PlayPotency(Msg_OtherCharAttackNpc3 _attack, Tbl_Action_HitInfo _hitInfo, int _idx, eDAMAGETYPE _type, Tbl_SkillLevel_Potency _lvPotency) { if(m_Owner == null) return false; if(_idx == int.MaxValue || m_Owner.ModelObject == null) return true; Tbl_SkillPotencyEffect_Record effect = AsTableManager.Instance.GetTbl_SkillPotencyEffect_Record(_idx); if(effect == null) return false; string effectPath = ""; string soundPath = ""; effectPath = effect.PotencyEffect_FileName; soundPath = effect.PotencySound_FileName; switch(_type) { case eDAMAGETYPE.eDAMAGETYPE_NORMAL: break; case eDAMAGETYPE.eDAMAGETYPE_CRITICAL: if(effect.PotencyCriticalEffect_FileName != "NONE") effectPath = effect.PotencyCriticalEffect_FileName; if(effect.PotencyCriticalSound_FileName != "NONE") soundPath = effect.PotencyCriticalSound_FileName; break; case eDAMAGETYPE.eDAMAGETYPE_MISS: // effectPath = "Miss"; // soundPath = "Miss"; break; case eDAMAGETYPE.eDAMAGETYPE_DODGE: // effectPath = "Dodge"; // soundPath = "Dodge"; break; case eDAMAGETYPE.eDAMAGETYPE_NOTHING: // effectPath = "Nothing"; // soundPath = "Nothing"; break; default: // effectPath = "etc"; // soundPath = "etc"; // if(m_Owner.FsmType == eFsmType.MONSTER) // Debug.Log("PotencyProcessor::PlayPotency: monster [class:" + m_Owner.GetProperty<string>(eComponentProperty.CLASS) + "] attack type is " + _type); break; } if(_hitInfo != null && _hitInfo.HitValueLookType == eValueLookType.Duration) { float interval = (_hitInfo.HitValueLookDuration / _hitInfo.HitValueLookCount) * 0.0005f; SequentPotency sequent = new SequentPotency(_attack, effectPath, soundPath, effect); for(int i=0; i<_hitInfo.HitValueLookCount; ++i) { AsTimerManager.Instance.SetTimer(interval * i + interval * 0.5f, Timer_SequentEffect, sequent); // Debug.Log("PotencyProcessor::PlayPotency: interval=" + interval * i); } } else { float lifeTime = 0; // if(effect.PotencyEffect_Timing == eEFFECT_TIMING.Duration && _lvPotency != null) lifeTime = _lvPotency.Potency_Duration; if( null != AsEffectManager.Instance && null != AsSoundManager.Instance) { float size = 1; if(effect.Effect_Size != float.MaxValue) size = effect.Effect_Size * 0.001f * m_Owner.characterController.height; if(size > m_MaxSize) size = m_MaxSize; AsEffectManager.Instance.PlayEffect(effectPath, m_Owner.ModelObject.transform, false, lifeTime, size); AsSoundManager.Instance.PlaySound(soundPath, m_Owner.ModelObject.transform.position, false); if(effect.HitShake != float.MaxValue) { if(m_Owner.FsmType == eFsmType.MONSTER || (m_Owner.FsmType == eFsmType.OTHER_USER && _attack != null)) ShakeProcess(effect.HitShake); } } else { Debug.Log("PotencyProcessor::PlayPotency: AsEffectManager or AsSoundManager instance is null."); return false; } } return true; }
bool PlayPotency(Msg_OtherCharAttackNpc3 _attack, Tbl_Action_HitInfo _hitInfo, int _idx, Tbl_SkillLevel_Potency _lvPotency) { return PlayPotency(_attack, _hitInfo, _idx, eDAMAGETYPE.eDAMAGETYPE_NORMAL, _lvPotency); }