Exemplo n.º 1
0
        private void CheckReady()
        {
            if (m_isdone)
            {
                return;
            }
            if (m_stageSelect.IsSelected == false || m_p1TeamInfo.IsSelected == false || m_p2TeamInfo.IsSelected == false)
            {
                return;
            }

            m_isdone = true;

            var p11index = m_p1TeamInfo.P1SelectData.CurrentCell.Y * Grid.Size.X + m_p1TeamInfo.P1SelectData.CurrentCell.X;
            var p12index = m_p1TeamInfo.P2SelectData.CurrentCell.Y * Grid.Size.X + m_p1TeamInfo.P2SelectData.CurrentCell.X;
            var p21index = m_p2TeamInfo.P1SelectData.CurrentCell.Y * Grid.Size.X + m_p2TeamInfo.P1SelectData.CurrentCell.X;
            var p22index = m_p2TeamInfo.P2SelectData.CurrentCell.Y * Grid.Size.X + m_p2TeamInfo.P2SelectData.CurrentCell.X;

            var p11 = PlayerProfiles[p11index];
            var p12 = m_p1TeamInfo.TeamMode == TeamMode.Single ? null : PlayerProfiles[p12index];
            var p21 = PlayerProfiles[p21index];
            var p22 = m_p2TeamInfo.TeamMode == TeamMode.Single ? null : PlayerProfiles[p22index];

            var init = new Combat.EngineInitialization(CombatMode.TeamVersus,
                                                       m_p1TeamInfo.TeamMode,
                                                       m_p2TeamInfo.TeamMode,
                                                       p11.Profile, m_p1TeamInfo.P1SelectData.PaletteIndex, PlayerMode.Human,
                                                       p12?.Profile, m_p1TeamInfo.P2SelectData.PaletteIndex, m_p1TeamInfo.TeamMode == TeamMode.Simul ? PlayerMode.Ai : PlayerMode.Human,
                                                       p21.Profile, m_p2TeamInfo.P1SelectData.PaletteIndex, PlayerMode.Human,
                                                       p22?.Profile, m_p2TeamInfo.P2SelectData.PaletteIndex, m_p2TeamInfo.TeamMode == TeamMode.Simul ? PlayerMode.Ai : PlayerMode.Human,
                                                       m_stageSelect.CurrentStage);

            SelectScreen.MenuSystem.PostEvent(new Events.SetupCombat(init));
            SelectScreen.MenuSystem.PostEvent(new Events.SwitchScreen(ScreenType.Versus));
        }
Exemplo n.º 2
0
        private void CheckReady()
        {
            if (m_isdone)
            {
                return;
            }
            if (m_stageSelect.IsSelected == false || m_p1info.IsSelected == false || m_p2info.IsSelected == false)
            {
                return;
            }

            m_isdone = true;

            var p1index = m_p1info.CurrentCell.Y * Grid.Size.X + m_p1info.CurrentCell.X;
            var p2index = m_p2info.CurrentCell.Y * Grid.Size.X + m_p2info.CurrentCell.X;

            var p1 = PlayerProfiles[p1index];
            var p2 = PlayerProfiles[p2index];

            var init = new Combat.EngineInitialization(CombatMode.Versus,
                                                       p1.Profile, m_p1info.PaletteIndex, PlayerMode.Human,
                                                       p2.Profile, m_p2info.PaletteIndex, PlayerMode.Human,
                                                       m_stageSelect.CurrentStage);

            SelectScreen.MenuSystem.PostEvent(new Events.SetupCombat(init));
            SelectScreen.MenuSystem.PostEvent(new Events.SwitchScreen(ScreenType.Versus));
        }
Exemplo n.º 3
0
        void CheckReady()
        {
            if (m_isdone == true)
            {
                return;
            }
            if (m_stageselected == false || m_p1info.IsSelected == false || m_p2info.IsSelected == false)
            {
                return;
            }

            m_isdone = true;

            if (m_currentstage == -1)
            {
                m_currentstage = MenuSystem.GetSubSystem <Random>().NewInt(0, StageProfiles.Count - 1);
            }

            Int32 p1index = (m_p1info.CurrentCell.Y * m_gridsize.X) + m_p1info.CurrentCell.X;
            Int32 p2index = (m_p2info.CurrentCell.Y * m_gridsize.X) + m_p2info.CurrentCell.X;

            PlayerSelect p1    = PlayerProfiles[p1index];
            PlayerSelect p2    = PlayerProfiles[p2index];
            StageProfile stage = StageProfiles[m_currentstage];

            Combat.EngineInitialization init = new Combat.EngineInitialization(CombatMode.Versus, p1.Profile, m_p1info.PaletteIndex, p2.Profile, m_p2info.PaletteIndex, stage);

            MenuSystem.PostEvent(new Events.SetupCombat(init));
            MenuSystem.PostEvent(new Events.SwitchScreen(ScreenType.Versus));
        }
        private void CheckReady()
        {
            if (m_isdone)
            {
                return;
            }
            if (m_stageSelect.IsSelected == false || m_p1info.IsSelected == false)
            {
                return;
            }

            m_isdone = true;

            var p1index = m_p1info.CurrentCell.Y * Grid.Size.X + m_p1info.CurrentCell.X;

            var p1 = PlayerProfiles[p1index];
            var p2 = PlayerProfiles[0];

            var init = new Combat.EngineInitialization(CombatMode.Arcade,
                                                       p1.Profile, m_p1info.PaletteIndex, PlayerMode.Human,
                                                       p2.Profile, 0, PlayerMode.Ai,
                                                       m_stageSelect.CurrentStage);

            SelectScreen.MenuSystem.PostEvent(new Events.SetupCombat(init));

            var storyboardPath = p1.Profile.BasePath + "/intro.def";
            var storyboard     = new Storyboard(SelectScreen.MenuSystem, storyboardPath);

            SelectScreen.MenuSystem.PostEvent(new Events.SetupStoryboard(storyboard, new Events.SwitchScreen(ScreenType.Versus)));
            SelectScreen.MenuSystem.PostEvent(new Events.SwitchScreen(ScreenType.Storyboard));
        }
Exemplo n.º 5
0
        public Recording(Combat.EngineInitialization init, List<RecordingData> data)
        {
            if (init == null) throw new ArgumentNullException("init");
            if (data == null) throw new ArgumentNullException("data");

            m_initsettings = init;
            m_data = data;
        }
Exemplo n.º 6
0
        public SetupCombat(Combat.EngineInitialization initialization)
        {
            if (initialization == null)
            {
                throw new ArgumentNullException(nameof(initialization));
            }

            m_initialization = initialization;
        }
Exemplo n.º 7
0
        public Recording(Combat.EngineInitialization init, List <RecordingData> data)
        {
            if (init == null)
            {
                throw new ArgumentNullException(nameof(init));
            }
            if (data == null)
            {
                throw new ArgumentNullException(nameof(data));
            }

            m_initsettings = init;
            m_data         = data;
        }
Exemplo n.º 8
0
 public void Reset()
 {
     m_isrecording = false;
     m_initsettings = m_screen.FightEngine.Initialization;
     m_data.Clear();
     m_input.Initialize();
 }