수정 완료
This commit is contained in:
parent
907a7f33e7
commit
cfdf2411dd
|
|
@ -121,7 +121,7 @@ public class MobShields : MonoBehaviour
|
|||
void CreateShield(int angleIndex, bool isCrash, float radius)
|
||||
{
|
||||
var shield = DSUtil.Get_Clone<MobShield>("Mob/MobShield", transform, Vector3.one * 10000f);
|
||||
float angle = angleIndex * 45f * Mathf.Deg2Rad;
|
||||
float angle = (angleIndex * 45f + 90f) * Mathf.Deg2Rad;
|
||||
Vector3 pos = new Vector3(Mathf.Cos(angle), Mathf.Sin(angle), 0f) * radius;
|
||||
shield.transform.localPosition = pos;
|
||||
shield.Set(isCrash, GetComponentInParent<MobActor>());
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ public class SupporterActor : MonoBehaviour
|
|||
{
|
||||
UpdateAngle(mob.transform.position);
|
||||
m_PD.tf_Start = tf_projectile;
|
||||
m_PD.Ignore_WallHP = true;
|
||||
ProjectileMgr.Ins.Shoot_Projectile(m_PD);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,13 +158,11 @@ public class IngameMgr : MonoBehaviourSingletonTemplate<IngameMgr>
|
|||
// 일반 몬스터 생성
|
||||
int meleemobcount = 0, rangemobcount = 0;
|
||||
var totalmobcount = wavedata.n_AppearMeleeMonster + wavedata.n_AppearRangeMonster;
|
||||
for (int i = 0; i < totalmobcount; i++)
|
||||
while (totalmobcount > meleemobcount + rangemobcount)
|
||||
{
|
||||
yield return new WaitForSeconds(wavedata.f_AppearDelay);
|
||||
for (int j = 0; j < wavedata.n_OverlapUnitCount; j++)
|
||||
{ // 근거리 or 원거리 몹 생성 후 카운팅
|
||||
if (totalmobcount < meleemobcount + rangemobcount) break;
|
||||
|
||||
bool canMelee = meleemobcount < wavedata.n_AppearMeleeMonster;
|
||||
bool canRange = rangemobcount < wavedata.n_AppearRangeMonster;
|
||||
|
||||
|
|
|
|||
|
|
@ -124,7 +124,11 @@ public class Projectile : MonoBehaviour
|
|||
|
||||
private void OnTriggerEnter2D(Collider2D collision)
|
||||
{
|
||||
if (m_ProjectileData.ActorType == eActor.Mob && collision.tag == "Mob") return;
|
||||
if (m_ProjectileData.ActorType == eActor.Mob)
|
||||
{
|
||||
if (collision.tag == "Mob" || collision.tag == "MobShield")
|
||||
return;
|
||||
}
|
||||
if (m_ProjectileData.Ignore_WallHP && collision.tag == "Wall_HP")
|
||||
{
|
||||
m_ProjectileData.Ignore_WallHP = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue