투사체 관련 수정
This commit is contained in:
parent
c00fa2c4cd
commit
907a7f33e7
|
|
@ -78,7 +78,7 @@ CircleCollider2D:
|
||||||
m_CallbackLayers:
|
m_CallbackLayers:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Bits: 4294967295
|
m_Bits: 4294967295
|
||||||
m_IsTrigger: 0
|
m_IsTrigger: 1
|
||||||
m_UsedByEffector: 0
|
m_UsedByEffector: 0
|
||||||
m_CompositeOperation: 0
|
m_CompositeOperation: 0
|
||||||
m_CompositeOrder: 0
|
m_CompositeOrder: 0
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ public class AimArrowController : MonoBehaviour
|
||||||
|
|
||||||
ProjectileData basePd = new ProjectileData
|
ProjectileData basePd = new ProjectileData
|
||||||
{
|
{
|
||||||
IsPC = true,
|
ActorType = eActor.PC,
|
||||||
m_Data = table_projectile.Ins.Get_Data(unit.n_ProjectileID),
|
m_Data = table_projectile.Ins.Get_Data(unit.n_ProjectileID),
|
||||||
tf_Start = arrow.transform,
|
tf_Start = arrow.transform,
|
||||||
Dmg = unit.n_DefaultAttack + (int)IngameMgr.Ins.Get_SkillValue(eSkillType.AttackUp),
|
Dmg = unit.n_DefaultAttack + (int)IngameMgr.Ins.Get_SkillValue(eSkillType.AttackUp),
|
||||||
|
|
@ -104,7 +104,7 @@ public class AimArrowController : MonoBehaviour
|
||||||
Bounce = basePd.Bounce,
|
Bounce = basePd.Bounce,
|
||||||
Pierce = basePd.Pierce,
|
Pierce = basePd.Pierce,
|
||||||
|
|
||||||
IsPC = basePd.IsPC,
|
ActorType = basePd.ActorType,
|
||||||
m_Data = basePd.m_Data,
|
m_Data = basePd.m_Data,
|
||||||
tf_Start = basePd.tf_Start,
|
tf_Start = basePd.tf_Start,
|
||||||
Dmg = basePd.Dmg
|
Dmg = basePd.Dmg
|
||||||
|
|
|
||||||
|
|
@ -152,11 +152,11 @@ public class MobActor : MonoBehaviour
|
||||||
|
|
||||||
ProjectileMgr.Ins.Shoot_Projectile(new ProjectileData
|
ProjectileMgr.Ins.Shoot_Projectile(new ProjectileData
|
||||||
{
|
{
|
||||||
IsPC = false,
|
ActorType = eActor.Mob,
|
||||||
m_Data = table_projectile.Ins.Get_Data(m_Data.n_ProjectileID),
|
m_Data = table_projectile.Ins.Get_Data(m_Data.n_ProjectileID),
|
||||||
tf_Start = transform,
|
tf_Start = transform,
|
||||||
Dmg = m_Attack,
|
Dmg = m_Attack,
|
||||||
Ignore_WallHP = true,
|
Ignore_WallHP = false,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -172,6 +172,8 @@ public class MobActor : MonoBehaviour
|
||||||
IngameMgr.Ins.Add_MobKill(m_Data.n_DropExp);
|
IngameMgr.Ins.Add_MobKill(m_Data.n_DropExp);
|
||||||
gameObject.SetActive(false);
|
gameObject.SetActive(false);
|
||||||
|
|
||||||
|
if (data.ActorType == eActor.PC)
|
||||||
|
{
|
||||||
var explosionlv = IngameMgr.Ins.Get_SkillLv(eSkillType.Explosion);
|
var explosionlv = IngameMgr.Ins.Get_SkillLv(eSkillType.Explosion);
|
||||||
if (explosionlv > 0)
|
if (explosionlv > 0)
|
||||||
{
|
{
|
||||||
|
|
@ -183,13 +185,14 @@ public class MobActor : MonoBehaviour
|
||||||
|
|
||||||
ProjectileMgr.Ins.Shoot_Projectile(new ProjectileData
|
ProjectileMgr.Ins.Shoot_Projectile(new ProjectileData
|
||||||
{
|
{
|
||||||
IsPC = true,
|
ActorType = data.ActorType,
|
||||||
Dmg = totaldmg,
|
Dmg = totaldmg,
|
||||||
m_Data = table_projectile.Ins.Get_Data(3002),
|
m_Data = table_projectile.Ins.Get_Data(3002),
|
||||||
tf_Start = transform,
|
tf_Start = transform,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (!bBoss)
|
else if (!bBoss)
|
||||||
{
|
{
|
||||||
if (data.m_Data != null)
|
if (data.m_Data != null)
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ public class SupporterActor : MonoBehaviour
|
||||||
private void OnEnable()
|
private void OnEnable()
|
||||||
{
|
{
|
||||||
attackCoolTime = MaxAttackCoolTime;
|
attackCoolTime = MaxAttackCoolTime;
|
||||||
m_PD.IsPC = true;
|
m_PD.ActorType = eActor.Supporter;
|
||||||
m_PD.Dmg = Damage;
|
m_PD.Dmg = Damage;
|
||||||
m_PD.m_Data = table_projectile.Ins.Get_Data(3201);
|
m_PD.m_Data = table_projectile.Ins.Get_Data(3201);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -356,7 +356,7 @@ public class IngameMgr : MonoBehaviourSingletonTemplate<IngameMgr>
|
||||||
{
|
{
|
||||||
var pd = new ProjectileData
|
var pd = new ProjectileData
|
||||||
{
|
{
|
||||||
IsPC = true,
|
ActorType = eActor.PC,
|
||||||
Dmg = 100,
|
Dmg = 100,
|
||||||
m_Data = table_projectile.Ins.Get_Data(3301),
|
m_Data = table_projectile.Ins.Get_Data(3301),
|
||||||
tf_Start = mobs[i].transform
|
tf_Start = mobs[i].transform
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ public class Projectile : MonoBehaviour
|
||||||
{
|
{
|
||||||
m_ProjectileData = pd;
|
m_ProjectileData = pd;
|
||||||
m_LifeTime = m_ProjectileData.m_Data.n_ProjectileLife;
|
m_LifeTime = m_ProjectileData.m_Data.n_ProjectileLife;
|
||||||
if (!m_ProjectileData.IsPC) m_ProjectileData.Ignore_WallHP = false;
|
if (m_ProjectileData.ActorType == eActor.Mob) m_ProjectileData.Ignore_WallHP = false;
|
||||||
|
|
||||||
Vector3 pos = pd.tf_Start.position;
|
Vector3 pos = pd.tf_Start.position;
|
||||||
Quaternion rot = pd.tf_Start.rotation;
|
Quaternion rot = pd.tf_Start.rotation;
|
||||||
|
|
@ -79,13 +79,13 @@ public class Projectile : MonoBehaviour
|
||||||
|
|
||||||
transform.rotation = Quaternion.AngleAxis(angle, transform.forward) * transform.rotation;
|
transform.rotation = Quaternion.AngleAxis(angle, transform.forward) * transform.rotation;
|
||||||
|
|
||||||
if (!pd.IsPC)
|
if (pd.ActorType == eActor.Mob)
|
||||||
transform.eulerAngles += new Vector3(0f, 0f, 180f);
|
transform.eulerAngles += new Vector3(0f, 0f, 180f);
|
||||||
|
|
||||||
dir = transform.up.normalized;
|
dir = transform.up.normalized;
|
||||||
|
|
||||||
m_ReflectCount = m_ProjectileData.m_Data.n_AttackBounceLimit;
|
m_ReflectCount = m_ProjectileData.m_Data.n_AttackBounceLimit;
|
||||||
if (pd.IsPC)
|
if (pd.ActorType == eActor.PC)
|
||||||
m_ReflectCount += (int)IngameMgr.Ins.Get_SkillValue(eSkillType.Reflect);
|
m_ReflectCount += (int)IngameMgr.Ins.Get_SkillValue(eSkillType.Reflect);
|
||||||
|
|
||||||
if (m_ProjectileData.m_Data.n_ProjectileID == 3002)
|
if (m_ProjectileData.m_Data.n_ProjectileID == 3002)
|
||||||
|
|
@ -124,7 +124,7 @@ public class Projectile : MonoBehaviour
|
||||||
|
|
||||||
private void OnTriggerEnter2D(Collider2D collision)
|
private void OnTriggerEnter2D(Collider2D collision)
|
||||||
{
|
{
|
||||||
if (!m_ProjectileData.IsPC && collision.tag == "Mob") return;
|
if (m_ProjectileData.ActorType == eActor.Mob && collision.tag == "Mob") return;
|
||||||
if (m_ProjectileData.Ignore_WallHP && collision.tag == "Wall_HP")
|
if (m_ProjectileData.Ignore_WallHP && collision.tag == "Wall_HP")
|
||||||
{
|
{
|
||||||
m_ProjectileData.Ignore_WallHP = false;
|
m_ProjectileData.Ignore_WallHP = false;
|
||||||
|
|
@ -207,7 +207,7 @@ public class Projectile : MonoBehaviour
|
||||||
|
|
||||||
void Check_Hit(Collider2D collision)
|
void Check_Hit(Collider2D collision)
|
||||||
{
|
{
|
||||||
if (m_ProjectileData.IsPC)
|
if (m_ProjectileData.ActorType != eActor.Mob)
|
||||||
{
|
{
|
||||||
switch(collision.tag)
|
switch(collision.tag)
|
||||||
{
|
{
|
||||||
|
|
@ -265,7 +265,7 @@ public class Projectile : MonoBehaviour
|
||||||
var p = ProjectileMgr.Ins.Get(m_ProjectileData.m_Data.s_ProjectilePrefabs);
|
var p = ProjectileMgr.Ins.Get(m_ProjectileData.m_Data.s_ProjectilePrefabs);
|
||||||
p.Set(new ProjectileData
|
p.Set(new ProjectileData
|
||||||
{
|
{
|
||||||
IsPC = m_ProjectileData.IsPC,
|
ActorType = m_ProjectileData.ActorType,
|
||||||
m_Data = m_ProjectileData.m_Data,
|
m_Data = m_ProjectileData.m_Data,
|
||||||
tf_Start = transform,
|
tf_Start = transform,
|
||||||
Dmg = m_ProjectileData.Dmg,
|
Dmg = m_ProjectileData.Dmg,
|
||||||
|
|
@ -332,11 +332,12 @@ public class Projectile : MonoBehaviour
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum eActor { PC, Mob, Supporter }
|
||||||
public class ProjectileData
|
public class ProjectileData
|
||||||
{
|
{
|
||||||
public ProjectileTableData m_Data;
|
public ProjectileTableData m_Data;
|
||||||
public Transform tf_Start;
|
public Transform tf_Start;
|
||||||
ObscuredBool _IsPC; public bool IsPC { get { return _IsPC; } set { _IsPC = value; _IsPC.RandomizeCryptoKey(); } }
|
public eActor ActorType;
|
||||||
ObscuredInt _Lv; public int Lv { get { return _Lv; } set { _Lv = value; _Lv.RandomizeCryptoKey(); } }
|
ObscuredInt _Lv; public int Lv { get { return _Lv; } set { _Lv = value; _Lv.RandomizeCryptoKey(); } }
|
||||||
ObscuredInt _Dmg; public int Dmg { get { return _Dmg; } set { _Dmg = value; _Dmg.RandomizeCryptoKey(); } }
|
ObscuredInt _Dmg; public int Dmg { get { return _Dmg; } set { _Dmg = value; _Dmg.RandomizeCryptoKey(); } }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue