Esempio n. 1
0
        public override void Update()
        {
            //move player bullet
            if (picEntity.Top > 0)
            {
                picEntity.Top -= Velocity;
            }
            else
            {
                Destroy();
            }

            //loop through each enemy to check if player bullet intersects with one of them
            foreach (Enemy Invader in List.Enemies)
            {
                if (Invader.picEntity.Visible && this.Bounds.IntersectsWith(Invader.Bounds))
                {
                    Destroy();
                    Invader.Destroy();
                    Sound.ChangeSound2URL("thunk.wav");
                    Sound.PlaySound2();
                    return;
                }
            }
        }