示例#1
0
        protected void CheckHit(Rioman player, AbstractBullet[] rioBullets)
        {
            if (isAlive && !player.IsLurking())
            {
                if (GetCollisionRect().Intersects(player.Hitbox))
                {
                    player.Hit(TOUCH_DAMAGE);
                }

                for (int i = 0; i <= rioBullets.Length - 1; i++)
                {
                    if (rioBullets[i] != null)
                    {
                        if (rioBullets[i].Hits(GetCollisionRect()))
                        {
                            int damage = rioBullets[i].TakeDamage(uniqueID);
                            if (damage > 0)
                            {
                                TakeDamage(damage);
                                blinkFrames = 2;
                            }
                        }
                    }
                }
            }

            SubCheckHit(player, rioBullets);
        }
示例#2
0
 protected override void SubCheckHit(Rioman player, AbstractBullet[] rioBullets)
 {
     for (int i = 0; i <= bullets.Length - 1; i++)
     {
         if (bullets[i].Hits(player.Hitbox))
         {
             if (bullets[i].type == 1)
             {
                 player.Hit(BULLET1_DAMAGE);
             }
             if (bullets[i].type == 2)
             {
                 player.Hit(BULLET2_DAMAGE);
             }
         }
     }
 }
示例#3
0
 protected override void SubCheckHit(Rioman player, AbstractBullet[] rioBullets)
 {
     for (int i = 0; i <= bullets.Length - 1; i++)
     {
         if (bullets[i].Hits(player.Hitbox))
         {
             if (bullets[i].type == SEAGULL)
             {
                 player.Hit(SEAGULL_DAMAGE);
             }
             if (bullets[i].type == CLOUD)
             {
                 player.Hit(CLOUD_DAMAGE);
             }
         }
     }
 }