Exemple #1
0
        public override void Draw(GameTime gametime, SpriteBatch g)
        {
            switch (MovieState)
            {
                #region rencontre
            case State.Rencontre:
                g.DrawString(GameResources.Texte2, TableParole[I], TabPositionParole[P], TabCouleur[(int)fontColor]);
                AnimationPlayer.Draw(gametime, g, PositionSplinter, SpriteEffects.None);
                m_AnimationPlayer.Draw(gametime, g, PositionLoxi, SpriteEffects.None);
                break;
                #endregion

            case State.Combat:
                g.GraphicsDevice.Clear(Color.WhiteSmoke);
                AnimationPlayer.Draw(gametime, g, PositionWario, SpriteEffects.None);

                if (APDon.m_Animation != null || APMich.m_Animation != null || APLeo.m_Animation != null || APRaph.m_Animation != null)
                {
                    APMich.Draw(gametime, g, PositionMich, SpriteEffects.None);
                    APDon.Draw(gametime, g, PositionDon, DonEffect);
                    APLeo.Draw(gametime, g, Positionleo, LeoEffect);
                    APRaph.Draw(gametime, g, PositionRaph, RaphEffect);
                }
                m_AnimationPlayer.Draw(gametime, g, PositionLoxi, SpriteEffects.None);
                g.DrawString(GameResources.Texte2, TableParole[I], TabPositionParole[P], TabCouleur[(int)fontColor]);
                break;
            }
        }
Exemple #2
0
        public override void Update(GameTime gameTime)
        {
            Timer += (float)gameTime.ElapsedGameTime.TotalSeconds;

            //if (KeyboardHelper.KeyPressed(Keys.Enter))
            //    I++;

            if (Timer >= 5)
            {
                I++;
                Timer = 0;
            }

            if (I >= TableParole.Length)
            {
                I = TableParole.Length - 1;
            }

            switch (MovieState)
            {
                #region Rencontre
            case State.Rencontre:
                AnimationPlayer.PlayAnimation(GameResources.DanseTransformation);
                break;

                #endregion
                #region Combat
            case State.Combat: if (I == 11)
                {
                    #region AttackMich
                    if (APMich.m_Animation == GameResources.MichAttack2Animation && APMich.m_FrameIndex == 3)
                    {
                        APMich.PlayAnimation(GameResources.MichAttenteAnimation);
                        AttackMich = true;
                    }
                    else if (!AttackMich)
                    {
                        APMich.PlayAnimation(GameResources.MichAttack2Animation);
                    }
                    #endregion

                    if (AttackMich)
                    {
                        #region AttackRaph
                        if (!AttackRaph)
                        {
                            PositionRaph.Y = PositionWario.Y + 40;
                        }
                        else
                        {
                            PositionRaph.Y = 450;
                        }

                        if (PositionRaph.Y <= PositionWario.Y + 80)
                        {
                            APRaph.PlayAnimation(GameResources.RaphAttack2Animation);
                        }

                        if (APRaph.m_Animation == GameResources.RaphAttack2Animation && APRaph.m_FrameIndex == 3)
                        {
                            APRaph.PlayAnimation(GameResources.RaphAttenteAnimation);
                            AttackRaph = true;
                        }
                        #endregion
                    }

                    if (AttackRaph)
                    {
                        #region AttackDon
                        if (!AttackDon)
                        {
                            PositionDon.Y = PositionWario.Y + 40;
                            PositionDon.X = PositionWario.X + 40;
                        }
                        else
                        {
                            PositionDon.Y = 450;
                            PositionDon.X = 500;
                        }

                        if (PositionDon.Y <= PositionWario.Y + 80)
                        {
                            APDon.PlayAnimation(GameResources.DonAttack2Animation);
                        }

                        if (APDon.m_Animation == GameResources.DonAttack2Animation && APDon.m_FrameIndex == 3)
                        {
                            APDon.PlayAnimation(GameResources.DonAttenteAnimation);
                            AttackDon = true;
                        }
                        #endregion
                    }

                    if (AttackDon)
                    {
                        #region AttackDon
                        if (!AttackLeo)
                        {
                            Positionleo.Y = PositionWario.Y + 40;
                            Positionleo.X = PositionWario.X + 40;
                        }
                        else
                        {
                            Positionleo.Y = 300;
                            Positionleo.X = 500;
                        }

                        if (PositionDon.Y <= PositionWario.Y + 80)
                        {
                            APLeo.PlayAnimation(GameResources.LeoAttack2Animation);
                        }

                        if (APLeo.m_Animation == GameResources.LeoAttack2Animation && APLeo.m_FrameIndex == 3)
                        {
                            APLeo.PlayAnimation(GameResources.LeoAttenteAnimation);
                            AttackLeo = true;
                        }
                        #endregion
                    }

                    if (AttackLeo)
                    {
                        PositionLoxi.X = PositionWario.X - 60;
                        PositionLoxi.Y = PositionWario.Y + 60;
                        if (!SCPart2)
                        {
                            m_AnimationPlayer.PlayAnimation(GameResources.SuperComboPart1);
                            if (m_AnimationPlayer.m_FrameIndex == 3)
                            {
                                SCPart2 = true;
                            }
                        }
                        else
                        {
                            m_AnimationPlayer.PlayAnimation(GameResources.SuperComboPart2);
                            if (m_AnimationPlayer.m_FrameIndex == 4)
                            {
                                AttackLoxi = true;
                            }
                        }

                        if (AttackLoxi)
                        {
                            AnimationPlayer.PlayAnimation(GameResources.WarioExploseAnimation);
                        }
                    }

                    if (AnimationPlayer.m_Animation == GameResources.WarioExploseAnimation)
                    {
                        if (AnimationPlayer.m_FrameIndex == 3)
                        {
                            TableParole[I] = "NOOOOOOOOOOOOOOOOO";
                        }
                        else if (AnimationPlayer.m_FrameIndex == 6)
                        {
                            AddScreen(new cFinal(m_ServiceProvider, m_GraphicsDeviceManager));
                            RemoveScreen(this);
                        }
                    }
                }
                break;
                #endregion
            }

            #region changement de parole
            switch (I)
            {
            case 0: m_AnimationPlayer.PlayAnimation(GameResources.LoxiNothingAnimation);
                AnimationPlayer.PlayAnimation(GameResources.DanseTransformation);
                break;

            case 1: fontColor = CouleurParole.Loxi;
                m_AnimationPlayer.PlayAnimation(GameResources.HulaAnimation);
                AnimationPlayer.PlayAnimation(GameResources.NothingSplinter);
                P = 0;
                break;

            case 2: fontColor = CouleurParole.Splinter;
                m_AnimationPlayer.PlayAnimation(GameResources.LoxiNothingAnimation);
                AnimationPlayer.PlayAnimation(GameResources.DanseTransformation);
                P = 1;
                break;

            case 3: fontColor = CouleurParole.Loxi;
                m_AnimationPlayer.PlayAnimation(GameResources.Hula2Animation);
                AnimationPlayer.PlayAnimation(GameResources.NothingSplinter);
                P = 0;
                break;

            case 4: fontColor = CouleurParole.Splinter;
                m_AnimationPlayer.PlayAnimation(GameResources.LoxiNothingAnimation);
                AnimationPlayer.PlayAnimation(GameResources.DanseTransformation);
                P = 1;
                break;

            case 5: fontColor       = CouleurParole.Loxi;
                P                   = 0;
                PositionLoxi.X     -= 4;
                PositionSplinter.X -= 4;
                if (PositionSplinter.X < 0)
                {
                    MovieState = State.Combat;
                    AnimationPlayer.PlayAnimation(GameResources.WarioExpliqueAnimation);
                    if (!Repositionnement)
                    {
                        Repositionnement = true;
                        PositionLoxi.X   = 840;
                    }
                    else
                    {
                        PositionLoxi.X += 2;
                    }
                }
                break;

            case 6: fontColor = CouleurParole.Wario;
                m_AnimationPlayer.PlayAnimation(GameResources.LoxiNothingAnimation);

                P = 0;
                break;

            case 7: fontColor = CouleurParole.Loxi;
                P             = 1;
                break;

            case 8: fontColor = CouleurParole.Wario;
                P             = 0;
                break;

            case 9: fontColor = CouleurParole.Loxi;
                P             = 1;
                break;

            case 10: fontColor = CouleurParole.Wario;
                AnimationPlayer.PlayAnimation(GameResources.WarioSurprisAnimation);
                APDon.PlayAnimation(GameResources.DonAttenteAnimation);
                APLeo.PlayAnimation(GameResources.LeoAttenteAnimation);
                APRaph.PlayAnimation(GameResources.RaphAttenteAnimation);
                APMich.PlayAnimation(GameResources.MichAttenteAnimation);

                DonEffect  = SpriteEffects.FlipHorizontally;
                LeoEffect  = SpriteEffects.FlipHorizontally;
                RaphEffect = SpriteEffects.FlipHorizontally;

                PositionDon.Y  += 1;
                PositionMich.Y += 1;
                PositionRaph.X -= 1;
                Positionleo.X  -= 1;
                if (PositionLoxi.X > 80)
                {
                    PositionLoxi.X -= 2;
                }
                P = 0;
                break;

            case 11:


                break;
            }
            #endregion
        }