public void BossClass(AnotherVec2 a_vcDir, float a_fSpeed) { if (BossliPool.Count == 0) { BmMake(nMAKE_DEFAULT_COUNT); } BossMonster Bossmonster = BossliPool[BossliPool.Count - 1]; BossliPool.RemoveAt(BossliPool.Count - 1); Bossmonster.Init(6.0F, 10, 0, a_vcDir, a_fSpeed); BossliActive.Add(Bossmonster); }
public void Boss_Update(float a_fDelta) { BossliTemp.Clear(); foreach (var val in BossliActive) { val.Update(a_fDelta); foreach (var b_val in BliActive) { //보스와 플레이어 총알 충돌부분 if ((int)val.m_vBmPos.x <= (int)b_val.m_vBPos.x && (int)val.m_vBmPos.x + 56 >= (int)b_val.m_vBPos.x && (int)val.m_vBmPos.y + 7 >= (int)b_val.m_vBPos.y) { BmLife--; b_val.m_fBLife = 0; if (BmLife < 0) { val.m_fBmLife = 0; BmLife = 0; Console.Clear(); clear.CRender(); } } } if (val.bIsDie == true) { val.RenderClear(); BossliTemp.Add(val); } } foreach (var val in BossliTemp) { BossliActive.Remove(val); BossliPool.Add(val); } BossliTemp.Clear(); }