Ejemplo n.º 1
0
        public void LoadContent(Texture2D[] textures, SpriteFont font, SpriteFont font2, Rectangle boundary)
        {
            m_paddle = new DuckHuntPaddle(m_player, textures[0], boundary);

            if (m_player == 0)
            {
                m_score              = new ScreenItem(HelperUtils.SafeBoundary.X + 10, HelperUtils.SafeBoundary.Y + 536, HelperUtils.SafeBoundary.X + 10 + textures[1].Width / 2, HelperUtils.SafeBoundary.Y + 544, textures[1], font2);
                m_score.Alpha        = false;
                m_cloud              = new ScreenItem(HelperUtils.SafeBoundary.X + 140, HelperUtils.SafeBoundary.Y + 544, HelperUtils.SafeBoundary.X + 140 + textures[2].Width / 2, HelperUtils.SafeBoundary.Y + 581, textures[2], font);
                m_cloud.NumUses      = 5;
                m_cloud.Font_Tint    = Color.Black;
                m_duckcall           = new ScreenItem(HelperUtils.SafeBoundary.X + 230, HelperUtils.SafeBoundary.Y + 544, HelperUtils.SafeBoundary.X + 230 + textures[3].Width / 2, HelperUtils.SafeBoundary.Y + 581, textures[3], font);
                m_duckcall.NumUses   = 2;
                m_duckcall.Font_Tint = Color.Black;
                m_shot           = new ScreenItem(HelperUtils.SafeBoundary.X + 320, HelperUtils.SafeBoundary.Y + 544, HelperUtils.SafeBoundary.X + 320 + textures[4].Width / 2, HelperUtils.SafeBoundary.Y + 581, textures[4], font);
                m_shot.NumUses   = 5;
                m_shot.Font_Tint = Color.Black;
            }
            else if (m_player == 1)
            {
                m_shot               = new ScreenItem(HelperUtils.SafeBoundary.X + 653, HelperUtils.SafeBoundary.Y + 544, HelperUtils.SafeBoundary.X + 653 + textures[4].Width / 2, HelperUtils.SafeBoundary.Y + 581, textures[4], font);
                m_shot.Effects       = SpriteEffects.FlipHorizontally;
                m_shot.NumUses       = 5;
                m_shot.Font_Tint     = Color.Black;
                m_duckcall           = new ScreenItem(HelperUtils.SafeBoundary.X + 743, HelperUtils.SafeBoundary.Y + 544, HelperUtils.SafeBoundary.X + 743 + textures[3].Width / 2, HelperUtils.SafeBoundary.Y + 581, textures[3], font);
                m_duckcall.NumUses   = 2;
                m_duckcall.Effects   = SpriteEffects.FlipHorizontally;
                m_duckcall.Font_Tint = Color.Black;
                m_cloud              = new ScreenItem(HelperUtils.SafeBoundary.X + 833, HelperUtils.SafeBoundary.Y + 544, HelperUtils.SafeBoundary.X + 833 + textures[2].Width / 2, HelperUtils.SafeBoundary.Y + 581, textures[2], font);
                m_cloud.Effects      = SpriteEffects.FlipHorizontally;
                m_cloud.NumUses      = 5;
                m_cloud.Font_Tint    = Color.Black;
                m_score              = new ScreenItem(HelperUtils.SafeBoundary.X + 908, HelperUtils.SafeBoundary.Y + 536, HelperUtils.SafeBoundary.X + 908 + textures[1].Width / 2, HelperUtils.SafeBoundary.Y + 544, textures[1], font2);
                m_score.Alpha        = false;
            }
        }
Ejemplo n.º 2
0
        public void LoadContent(Texture2D[] textures, SpriteFont font, SpriteFont font2, Rectangle boundary)
        {
            m_paddle = new DuckHuntPaddle(m_player, textures[0], boundary);

            if (m_player == 0)
            {
                m_score = new ScreenItem(HelperUtils.SafeBoundary.X + 10, HelperUtils.SafeBoundary.Y + 536, HelperUtils.SafeBoundary.X + 10 + textures[1].Width / 2, HelperUtils.SafeBoundary.Y + 544, textures[1], font2);
                m_score.Alpha = false;
                m_cloud = new ScreenItem(HelperUtils.SafeBoundary.X + 140, HelperUtils.SafeBoundary.Y + 544, HelperUtils.SafeBoundary.X + 140 + textures[2].Width / 2, HelperUtils.SafeBoundary.Y + 581, textures[2], font);
                m_cloud.NumUses = 5;
                m_cloud.Font_Tint = Color.Black;
                m_duckcall = new ScreenItem(HelperUtils.SafeBoundary.X + 230, HelperUtils.SafeBoundary.Y + 544, HelperUtils.SafeBoundary.X + 230 + textures[3].Width / 2, HelperUtils.SafeBoundary.Y + 581, textures[3], font);
                m_duckcall.NumUses = 2;
                m_duckcall.Font_Tint = Color.Black;
                m_shot = new ScreenItem(HelperUtils.SafeBoundary.X + 320, HelperUtils.SafeBoundary.Y + 544, HelperUtils.SafeBoundary.X + 320 + textures[4].Width / 2, HelperUtils.SafeBoundary.Y + 581, textures[4], font);
                m_shot.NumUses = 5;
                m_shot.Font_Tint = Color.Black;

            }
            else if (m_player == 1)
            {
                m_shot = new ScreenItem(HelperUtils.SafeBoundary.X + 653, HelperUtils.SafeBoundary.Y + 544, HelperUtils.SafeBoundary.X + 653 + textures[4].Width / 2, HelperUtils.SafeBoundary.Y + 581, textures[4], font);
                m_shot.Effects = SpriteEffects.FlipHorizontally;
                m_shot.NumUses = 5;
                m_shot.Font_Tint = Color.Black;
                m_duckcall = new ScreenItem(HelperUtils.SafeBoundary.X + 743, HelperUtils.SafeBoundary.Y + 544, HelperUtils.SafeBoundary.X + 743 + textures[3].Width / 2, HelperUtils.SafeBoundary.Y + 581, textures[3], font);
                m_duckcall.NumUses = 2;
                m_duckcall.Effects = SpriteEffects.FlipHorizontally;
                m_duckcall.Font_Tint = Color.Black;
                m_cloud = new ScreenItem(HelperUtils.SafeBoundary.X + 833, HelperUtils.SafeBoundary.Y + 544, HelperUtils.SafeBoundary.X + 833 + textures[2].Width / 2, HelperUtils.SafeBoundary.Y + 581, textures[2], font);
                m_cloud.Effects = SpriteEffects.FlipHorizontally;
                m_cloud.NumUses = 5;
                m_cloud.Font_Tint = Color.Black;
                m_score = new ScreenItem(HelperUtils.SafeBoundary.X + 908, HelperUtils.SafeBoundary.Y + 536, HelperUtils.SafeBoundary.X + 908 + textures[1].Width / 2, HelperUtils.SafeBoundary.Y + 544, textures[1], font2);
                m_score.Alpha = false;
            }
        }