예제 #1
0
        void UpdateLogic()
        {
            m_logic.Update();

            if (m_logic.IsFinished() == true)
            {
                if (m_logic is Logic.PreIntro)
                {
                    m_logic = new Logic.ShowCharacterIntro(this);
                }
                else if (m_logic is Logic.ShowCharacterIntro)
                {
                    m_logic = new Logic.DisplayRoundNumber(this);
                }
                else if (m_logic is Logic.DisplayRoundNumber)
                {
                    m_logic = new Logic.ShowFight(this);
                }
                else if (m_logic is Logic.ShowFight)
                {
                    m_logic = new Logic.Fighting(this);
                }
                else if (m_logic is Logic.Fighting)
                {
                    m_logic = new Logic.CombatOver(this);
                }
                else if (m_logic is Logic.CombatOver)
                {
                    m_logic = new Logic.ShowWinPose(this);
                }
                else if (m_logic is Logic.ShowWinPose)
                {
                    if (Team1.Wins.Count >= RoundInformation.NumberOfRounds || Team2.Wins.Count >= RoundInformation.NumberOfRounds)
                    {
                        GetMainSystem <Menus.MenuSystem>().PostEvent(new Events.SwitchScreen(ScreenType.Title));
                        m_logic = new Logic.NoMoreFighting(this);
                    }
                    else
                    {
                        RoundNumber += 1;
                        m_logic      = new Logic.PreIntro(this);
                    }
                }
            }
        }
예제 #2
0
        private void UpdateLogic()
        {
            m_logic.Update();

            if (m_logic.IsFinished())
            {
                if (m_logic is Logic.PreIntro)
                {
                    m_logic = new Logic.ShowCharacterIntro(this);
                    return;
                }

                if (m_logic is Logic.ShowCharacterIntro)
                {
                    m_logic = new Logic.DisplayRoundNumber(this);
                    return;
                }

                if (m_logic is Logic.DisplayRoundNumber)
                {
                    m_logic = new Logic.ShowFight(this);
                    return;
                }

                if (m_logic is Logic.ShowFight)
                {
                    m_logic = new Logic.Fighting(this);
                    return;
                }

                if (m_logic is Logic.Fighting)
                {
                    m_logic = new Logic.CombatOver(this);
                    return;
                }

                if (m_logic is Logic.CombatOver)
                {
                    m_logic = new Logic.ShowWinPose(this);
                    return;
                }

                if (!(m_logic is Logic.ShowWinPose))
                {
                    return;
                }

                if (Team1.Wins.Count >= RoundInformation.NumberOfRounds || Team2.Wins.Count >= RoundInformation.NumberOfRounds)
                {
                    if (Initialization.Mode == CombatMode.Arcade)
                    {
                        var index = Team2.MainPlayer.BasePlayer.Profile.ProfileLoader.PlayerProfiles
                                    .Select(o => o.Profile).ToList()
                                    .IndexOf(Team2.MainPlayer.BasePlayer.Profile) + 1;
                        if (index == Team2.MainPlayer.BasePlayer.Profile.ProfileLoader.PlayerProfiles.Count)
                        {
                            GetMainSystem <Menus.MenuSystem>().PostEvent(new Events.SwitchScreen(ScreenType.Title));
                            m_logic = new Logic.NoMoreFighting(this);
                            return;
                        }

                        RoundNumber = 1;
                        MatchNumber++;

                        // same team 1
                        Team1.Clear();
                        Team1.CreatePlayers(Initialization.Team1Mode, Initialization.Team1P1, Initialization.Team1P2);

                        // update team 2
                        var profile = Team2.MainPlayer.BasePlayer.Profile.ProfileLoader.PlayerProfiles[index].Profile;
                        Team2.Clear();
                        Team2.CreatePlayers(Initialization.Team2Mode,
                                            new PlayerCreation(profile, 0, PlayerMode.Ai),
                                            null);
                        m_logic = new Logic.PreIntro(this);
                        return;
                    }

                    GetMainSystem <Menus.MenuSystem>().PostEvent(new Events.SwitchScreen(ScreenType.Title));
                    m_logic = new Logic.NoMoreFighting(this);
                    return;
                }

                RoundNumber++;
                m_logic = new Logic.PreIntro(this);
            }
        }
예제 #3
0
        void UpdateLogic()
        {
            m_logic.Update();

            if (m_logic.IsFinished() == true)
            {
                if (m_logic is Logic.PreIntro)
                {
                    m_logic = new Logic.ShowCharacterIntro(this);
                }
                else if (m_logic is Logic.ShowCharacterIntro)
                {
                    m_logic = new Logic.DisplayRoundNumber(this);
                }
                else if (m_logic is Logic.DisplayRoundNumber)
                {
                    m_logic = new Logic.ShowFight(this);
                }
                else if (m_logic is Logic.ShowFight)
                {
                    m_logic = new Logic.Fighting(this);
                }
                else if (m_logic is Logic.Fighting)
                {
                    m_logic = new Logic.CombatOver(this);
                }
                else if (m_logic is Logic.CombatOver)
                {
                    m_logic = new Logic.ShowWinPose(this);
                }
                else if (m_logic is Logic.ShowWinPose)
                {
                    if (Team1.Wins.Count >= RoundInformation.NumberOfRounds || Team2.Wins.Count >= RoundInformation.NumberOfRounds)
                    {
                        GetMainSystem<Menus.MenuSystem>().PostEvent(new Events.SwitchScreen(ScreenType.Title));
                        m_logic = new Logic.NoMoreFighting(this);
                    }
                    else
                    {
                        RoundNumber += 1;
                        m_logic = new Logic.PreIntro(this);
                    }
                }
            }
        }