Esempio n. 1
0
        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();
                }
            }
        }
Esempio n. 2
0
        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);
                }
            }
        }
Esempio n. 3
0
        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);
                }
            }
        }
Esempio n. 4
0
        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);
                }
            }
        }