Beispiel #1
0
        public override void LoadContent()
        {
            width  = ScreenManager.GraphicsDevice.Viewport.Width;
            height = ScreenManager.GraphicsDevice.Viewport.Height;

            how_to_play_string  = langue.getString(46);
            tap_continue_string = langue.getString(47);
            tuto_1 = langue.getString(48);
            tuto_2 = langue.getString(49);
            tuto_3 = langue.getString(50);
            tuto_4 = langue.getString(51);

            transition = new TransitionClass();
            transition._transition_alpha = 1f;
            plateau = new Plateau_Intro(this, (int)(height * 0.35));

            font_manage = new Police_Size_Manage(height, width, this);
            font_bouton = font_manage.Get_Regular_Font();
            font_titre  = font_manage.Get_Bold_Font();

            blbl = new Rectangle((int)(width * 0.1), (int)(height * 0.125), (int)(width * 0.9), (int)(height * 0.3));
            Divers_Method method = new Divers_Method();

            texte_1 = method.parseText(tuto_1, font_bouton, blbl, font_manage._scale);
            texte_2 = method.parseText(tuto_2, font_bouton, blbl, font_manage._scale);
            texte_3 = method.parseText(tuto_3, font_bouton, blbl, font_manage._scale);
            texte_4 = method.parseText(tuto_4, font_bouton, blbl, font_manage._scale);

            base.LoadContent();
        }
Beispiel #2
0
        public void Draw(TransitionClass transition, string side, List <Texture2D> texture)
        {
            //DRAW CASE
            Vector2 origin = new Vector2(texture [0].Width / 2, texture [0].Height / 2);

            if (_type_case == Type_Case.Vide)
            {
                _screen.ScreenManager.SpriteBatch.Draw(texture [0], new Vector2(_position.X, _position.Y), Color.White * transition._transition_alpha);
            }
            else if (_type_case == Type_Case.Red)
            {
                _screen.ScreenManager.SpriteBatch.Draw(texture [0], new Vector2(_position.X, _position.Y), Color.White * transition._transition_alpha);
                if (_type_annim == Type_Annimation.Both && !_half_done_annimation_both)
                {
                    _screen.ScreenManager.SpriteBatch.Draw(texture [2], new Vector2(_position.X + origin.X, _position.Y + origin.Y), null, Color.White * transition._transition_alpha, 0f, origin, _scale_annimation, SpriteEffects.None, 0f);
                }
                else
                {
                    _screen.ScreenManager.SpriteBatch.Draw(texture [1], new Vector2(_position.X + origin.X, _position.Y + origin.Y), null, Color.White * transition._transition_alpha, 0f, origin, _scale_annimation, SpriteEffects.None, 0f);
                }
            }
            else if (_type_case == Type_Case.Green)
            {
                _screen.ScreenManager.SpriteBatch.Draw(texture [0], new Vector2(_position.X, _position.Y), Color.White * transition._transition_alpha);
                if (_type_annim == Type_Annimation.Both && !_half_done_annimation_both)
                {
                    _screen.ScreenManager.SpriteBatch.Draw(texture [1], new Vector2(_position.X + origin.X, _position.Y + origin.Y), null, Color.White * transition._transition_alpha, 0f, origin, _scale_annimation, SpriteEffects.None, 0f);
                }
                else
                {
                    _screen.ScreenManager.SpriteBatch.Draw(texture [2], new Vector2(_position.X + origin.X, _position.Y + origin.Y), null, Color.White * transition._transition_alpha, 0f, origin, _scale_annimation, SpriteEffects.None, 0f);
                }
            }

            //DRAW SURBRILLANCE
            Texture2D texture_surbrillance_couleur_saut;
            Texture2D texture_surbrillance_couleur;

            if (side == "1")              //RED
            {
                texture_surbrillance_couleur      = texture [1];
                texture_surbrillance_couleur_saut = texture [3];
            }
            else
            {
                texture_surbrillance_couleur      = texture [2];
                texture_surbrillance_couleur_saut = texture [4];
            }

            if (_type_surbrillance == Surbrillance_Type.Evolution)
            {
                _screen.ScreenManager.SpriteBatch.Draw(texture_surbrillance_couleur, new Vector2(_position.X, _position.Y), Color.White * (float)(transition._transition_alpha * 0.5));
            }
            else if (_type_surbrillance == Surbrillance_Type.Saut)
            {
                _screen.ScreenManager.SpriteBatch.Draw(texture_surbrillance_couleur_saut, new Vector2(_position.X, _position.Y), Color.White * (float)(transition._transition_alpha * 0.5));
            }
        }
Beispiel #3
0
 private void Draw_Case_Plateau(TransitionClass transition)
 {
     for (int i = 0; i < array_case_class.Length; i++)
     {
         array_case_class [i].Draw(transition, _side, new List <Texture2D> {
             case_vide, case_rouge, case_verte, case_surbrillance_rouge, case_surbrillance_vert
         });
     }
 }
Beispiel #4
0
 public void Draw(TransitionClass transition)
 {
     _screen.ScreenManager.SpriteBatch.Draw(plateau_fond, new Vector2(position_plateau.X, position_plateau.Y), Color.White * transition._transition_alpha);
     Draw_Case_Plateau(transition);
 }