Ejemplo 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();
                }
            }
        }
Ejemplo n.º 2
0
 public void update(GameTime gameTime)
 {
     m_PosX += m_SourceRect.Width;
     if (m_PosX >= m_SpriteWidth)
     {
         m_PosX = 0;
     }
     if (CollisionCheck.collisionCheck(Player.collisionRectangle(), m_CollisionRect))
     {
         Player.instantDeath();
     }
 }