private void collisioncheck() { if (IsActive == true) { if (m_BossState == BossState.CHARGING) { if (LaserManager.collisionCheck(m_HornDamageRect)) { //take damge m_Health--; if (m_Health <= 0) { m_BossState = BossState.DYING; for (int i = 0; i < m_Particles.Length; i++) { m_Particles[i].Stop = true; } } } } if (CollisionCheck.collisionCheck(m_CollisionRect, Player.collisionRectangle())) { //for overkill damage Player.instantDeath(); } } }
public void update(GameTime gameTime) { for (int i = 0; i < m_beesList.Count; i++) { m_beesList[i].update(gameTime); if (LaserManager.collisionCheck(m_beesList[i].Destination)) { m_beesList.RemoveAt(i); } } }
public void update(GameTime gameTime) { for (int i = 0; i < m_spiderList.Count; i++) { m_spiderList[i].update(gameTime); if (LaserManager.collisionCheck(m_spiderList[i].Destination)) { m_spiderList[i].spiderState = SpiderState.DYING; } if (m_spiderList[i].spiderState == SpiderState.DYING && m_spiderList[i].spiderAggroState == SpiderAggroState.RETREATING) { m_spiderList.RemoveAt(i); } } }
public void update(GameTime gameTime) { for (int i = 0; i < m_impList.Count; i++) { m_impList[i].update(gameTime); if (LaserManager.collisionCheck(m_impList[i].Destination)) { m_impList[i].takeDamage(); if (m_impList[i].currentHealth == 0) { m_impList[i].impState = ImpState.DYING; } } if (m_impList[i].impState == ImpState.DYING && m_impList[i].getTimer >= m_impList[i].getEndTimer) { m_impList.RemoveAt(i); } } }