가장자리에서 투사체가 소멸하거나 반사 될 때는 히트 이펙트가 안나와야할 것 같습니다. (※몬스터에게 피격 될 때만 발생)
This commit is contained in:
parent
2313c3d659
commit
21dbb59975
|
|
@ -207,30 +207,37 @@ public class Projectile : MonoBehaviour
|
|||
|
||||
void Check_Hit(Collider2D collision)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(m_ProjectileData.m_Data.s_HitEffect))
|
||||
EffectMgr.Ins.Show_Effect(m_ProjectileData.m_Data.s_HitEffect, transform.position);
|
||||
|
||||
if (m_ProjectileData.IsPC)
|
||||
{
|
||||
switch(collision.tag)
|
||||
{
|
||||
case "Mob":
|
||||
Show_Hit_Effect();
|
||||
collision.GetComponent<MobActor>().Get_Dmg(m_ProjectileData);
|
||||
Spawn_LeftRight(collision.transform);
|
||||
Spawn_UpDown(collision.transform);
|
||||
Spawn_Bounce(collision.GetComponent<MobActor>());
|
||||
break;
|
||||
case "MobShield": collision.GetComponent<MobShield>().Get_Dmg(); break;
|
||||
case "MobShield":
|
||||
Show_Hit_Effect();
|
||||
collision.GetComponent<MobShield>().Get_Dmg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (collision.tag == "Wall_HP")
|
||||
{
|
||||
Show_Hit_Effect();
|
||||
IngameMgr.Ins.Get_Dmg(m_ProjectileData.Dmg);
|
||||
}
|
||||
}
|
||||
}
|
||||
void Show_Hit_Effect()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(m_ProjectileData.m_Data.s_HitEffect))
|
||||
EffectMgr.Ins.Show_Effect(m_ProjectileData.m_Data.s_HitEffect, transform.position);
|
||||
}
|
||||
|
||||
public void SetDirection(Vector2 direction)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue