Esempio n. 1
0
        private static WresIDGroup SelectOpponent(int index)
        {
            WresIDGroup opponent = null;
            int         searchIndex;

            if (waitingOpponents.Count == 0)
            {
                InitializeLists();
            }

            //Handle selection for tag matches
            if (waitingOpponents.Count == 1 && isTag)
            {
                opponent = waitingOpponents[0];
                InitializeLists();
                currOpponents[index] = opponent;
                return(opponent);
            }

            //Select opponent
            if (isRandom)
            {
                searchIndex = rnd.Next(waitingOpponents.Count - 1);
            }
            else
            {
                searchIndex = 0; //Get the next opponent in the list
            }

            if (isTag)
            {
                //Ensure that duplicate members are not selected
                if (index == 1)
                {
                    WresIDGroup firstOpp  = currOpponents[0];
                    WresIDGroup secondOpp = waitingOpponents[searchIndex];
                    if (firstOpp.Equals(secondOpp))
                    {
                        foreach (WresIDGroup wrestler in waitingOpponents)
                        {
                            if (!firstOpp.Equals(wrestler))
                            {
                                currOpponents[index] = wrestler;
                                secondOpp            = wrestler;
                                break;
                            }
                        }
                        return(secondOpp);
                    }
                    else
                    {
                        currOpponents[index] = secondOpp;
                        return(secondOpp);
                    }
                }
            }

            currOpponents[index] = waitingOpponents[searchIndex];
            return(waitingOpponents[searchIndex]);
        }
Esempio n. 2
0
        private static void UpdateTeamMembers()
        {
            if (waitingOpponents.Count == 0)
            {
                InitializeLists();
                return;
            }

            WresIDGroup firstOpp  = currOpponents[0];
            WresIDGroup secondOpp = null;

            if (isTag)
            {
                secondOpp = currOpponents[1];
            }

            try
            {
                //Move previous opponents to used list
                usedOpponents.Add(firstOpp);
                waitingOpponents.Remove(firstOpp);

                if (isTag)
                {
                    usedOpponents.Add(secondOpp);
                    waitingOpponents.Remove(secondOpp);
                }
            }
            catch (Exception ex)
            {
                L.D("Exception: " + ex.Message);
            }
        }
Esempio n. 3
0
        private void uk_addWrestler_Click(object sender, EventArgs e)
        {
            if (uk_wrestlerResults.Items.Count == 0)
            {
                return;
            }

            try
            {
                WresIDGroup wrestler = (WresIDGroup)uk_wrestlerResults.SelectedItem;

                foreach (UkemiNotification item in uk_wrestlers.Items)
                {
                    if (item.Name == wrestler.Name)
                    {
                        return;
                    }
                }

                UkemiNotification notification = new UkemiNotification {
                    Name = wrestler.Name, Type = EnumLibrary.NotificationType.Wrestler, CheerList = new List <CheerVoiceEnum>()
                };
                uk_wrestlers.Items.Add(notification);
                uk_wrestlers.SelectedIndex = 0;
            }
            catch (Exception ex)
            {
                L.D("AddWrestlerError: " + ex);
            }
        }
Esempio n. 4
0
        private void PopulateWrestlers()
        {
            try

            {
                uk_wrestlerResults.Items.Clear();
                wrestlerList.Clear();

                foreach (EditWrestlerData current in SaveData.inst.editWrestlerData)
                {
                    WresIDGroup wresIDGroup = new WresIDGroup();
                    wresIDGroup.Name  = DataBase.GetWrestlerFullName(current.wrestlerParam);
                    wresIDGroup.ID    = (Int32)current.editWrestlerID;
                    wresIDGroup.Group = current.wrestlerParam.groupID;
                    uk_wrestlerResults.Items.Add(wresIDGroup);
                    wrestlerList.Add(wresIDGroup);
                }

                uk_wrestlerResults.SelectedIndex = 0;
            }
            catch

            {
            }
        }
Esempio n. 5
0
        private void LoadSubs()
        {
            try
            {
                this.tos_wrestlerResults.Items.Clear();
                wrestlerList = new List <WresIDGroup>();

                foreach (EditWrestlerData current in SaveData.inst.editWrestlerData)
                {
                    WresIDGroup wresIDGroup = new WresIDGroup();
                    wresIDGroup.Name = DataBase.GetWrestlerFullName(current.wrestlerParam);
                    wresIDGroup.ID   = (Int32)current.editWrestlerID;

                    wrestlerList.Add(wresIDGroup);
                    this.tos_wrestlerResults.Items.Add(wresIDGroup);
                }

                if (tos_wrestlerResults.Items.Count > 0)
                {
                    this.tos_wrestlerResults.SelectedIndex = 0;
                }
            }
            catch (Exception ex)
            {
                L.D("Load Subs Exception: " + ex);
            }
        }
 private void UpdateWrestlerPartsByValue(WresIDGroup wrestler)
 {
     for (int i = 0; i < 4; i++)
     {
         try
         {
             var costumeData = DataBase.GetCostumeData((WrestlerID)wrestler.ID, i);
             if (costumeData != null)
             {
                 costumeData = UpdateCostume(Operation.Addition, costumeData);
             }
         }
         catch (Exception ex)
         {
             L.D("Error with costume # " + i + ": " + ex);
         }
     }
 }
Esempio n. 7
0
        private static void SetupMatch()
        {
            MatchSetting settings = GlobalWork.inst.MatchSetting;

            isTag        = MoreMatchTypes_Form.SurvivalRoadData.Tag;
            isRandom     = MoreMatchTypes_Form.SurvivalRoadData.RandomSelect;
            playerEdit   = MoreMatchTypes_Form.SurvivalRoadData.Wrestler;
            secondEdit   = MoreMatchTypes_Form.SurvivalRoadData.Second;
            opponentTeam = MoreMatchTypes_Form.SurvivalRoadData.OpponentName;
            isRegen      = MoreMatchTypes_Form.SurvivalRoadData.RegainHP;

            //Create Initial Wrestler List
            waitingOpponents = new List <WresIDGroup>();
            usedOpponents    = new List <WresIDGroup>();
            teamList         = new List <WresIDGroup>();
            InitializeLists();
            currOpponents = new WresIDGroup[2]; //Only a maximum of two characters per team

            //Setting the initial opponents
            currOpponents[0] = MoreMatchTypes_Form.SurvivalRoadData.InitialOpponents[0];

            if (isTag)
            {
                currOpponents[1] = MoreMatchTypes_Form.SurvivalRoadData.InitialOpponents[1];
            }

            endRound    = false;
            endMatch    = false;
            loserIndex  = -1;
            gameDetails = new int[9];
            teamNames   = new String[2];
            SetTeamNames();

            //Setting game details
            gameDetails[0] = Convert.ToInt32(MoreMatchTypes_Form.SurvivalRoadData.Matches);
            gameDetails[1] = Convert.ToInt32(MoreMatchTypes_Form.SurvivalRoadData.Continues);
            settings.isSkipEntranceScene      = true;
            settings.intrusionRate[0]         = IntrusionRate.None;
            settings.intrusionRate[1]         = IntrusionRate.None;
            global::GlobalParam.is3GamesMatch = true;
            global::GlobalParam.m_MacthCount  = 0;
            settings.RoundNum       = 0;
            MatchMain.inst.RoundCnt = 1;
        }
        private void LoadWrestlers()
        {
            try
            {
                wrestlerList.Items.Clear();

                foreach (EditWrestlerData current in SaveData.inst.editWrestlerData)
                {
                    WresIDGroup wresIDGroup = new WresIDGroup();
                    wresIDGroup.Name  = DataBase.GetWrestlerFullName(current.wrestlerParam);
                    wresIDGroup.ID    = (Int32)current.editWrestlerID;
                    wresIDGroup.Group = current.wrestlerParam.groupID;
                    this.wrestlerList.Items.Add(wresIDGroup);
                }

                this.wrestlerList.SelectedIndex = 0;
            }
            catch (Exception e)
            {
                L.D("LoadWrestlersException: " + e);
            }
        }
Esempio n. 9
0
        private void LoadSubs()
        {
            try
            {
                this.we_resultList.Items.Clear();
                wrestlerList.Clear();
                int index = 0;

                foreach (EditWrestlerData current in SaveData.inst.editWrestlerData)
                {
                    WresIDGroup wresIDGroup = new WresIDGroup();
                    wresIDGroup.Name  = DataBase.GetWrestlerFullName(current.wrestlerParam);
                    wresIDGroup.ID    = (Int32)current.editWrestlerID;
                    wresIDGroup.Group = current.wrestlerParam.groupID;
                    index             = SaveData.inst.editWrestlerData.IndexOf(current);

                    //Set the subscription ID for the wrestler
                    foreach (SubscribeItemInfo sub in SaveData.inst.subscribeItemInfoData)
                    {
                        if (sub.GetItemType() == Workshop_Item.Wrestler)
                        {
                            if (sub.GetItemId() == index)
                            {
                                wresIDGroup.Info = sub;
                            }
                        }
                    }

                    wrestlerList.Add(wresIDGroup);
                    this.we_resultList.Items.Add(wresIDGroup);
                }

                this.we_resultList.SelectedIndex = 0;
            }
            catch
            {
            }
        }
Esempio n. 10
0
        private void we_edit_Click(object sender, EventArgs e)
        {
            try
            {
                //Menu_SceneManager manager = new Menu_SceneManager();
                CreateMenu_SceneManager manager  = new CreateMenu_SceneManager();
                WresIDGroup             wrestler = (WresIDGroup)we_resultList.SelectedItem;
                WrestlerID wID = (WrestlerID)wrestler.ID;
                L.D("Loading " + wrestler.Name + " at " + wrestler.ID);
                if (global::CreateMenu_SceneManager.edit_data == null)
                {
                    global::CreateMenu_SceneManager.edit_data = new EditWrestlerData();
                }
                if (global::CreateMenu_SceneManager.edit_data.criticalMoveName == null)
                {
                    global::CreateMenu_SceneManager.edit_data.criticalMoveName = string.Empty;
                }

                if (global::CreateMenu_SceneManager.edit_data.ThemeMusic_Filename == null)
                {
                    global::CreateMenu_SceneManager.edit_data.ThemeMusic_Filename = string.Empty;
                }
                global::CreateMenu_SceneManager.edit_data.appearanceData.Set(global::DataBase.GetAppearanceData(wID));
                global::CreateMenu_SceneManager.editWrestlerID  = wID;
                global::CreateMenu_SceneManager.edit_data       = global::SaveData.GetInst().GetEditWrestlerData(wID).Clone();
                global::CreateMenu_SceneManager.flg_Overwrite   = true;
                global::CreateMenu_SceneManager.user_edit_point = 380;
                global::CreateMenu_SceneManager.presetEditMode  = false;
                MyMusic.Init();
                UnityEngine.SceneManagement.SceneManager.LoadScene("Scene_WrestlerEditMenu");
            }
            catch (Exception ex)
            {
                L.D("Edit Click Error: " + ex.StackTrace);
            }
        }
        private void ReduceBy_Current_Click(object sender, EventArgs e)
        {
            WresIDGroup wrestler = (WresIDGroup)wrestlerList.SelectedItem;

            ReduceWrestlerPartsByValue(wrestler);
        }
        private void UpdateTo_Current_Click(object sender, EventArgs e)
        {
            WresIDGroup wrestler = (WresIDGroup)wrestlerList.SelectedItem;

            UpdateWrestlerPartsToValue(wrestler);
        }
Esempio n. 13
0
        private Player ActivatePlayer(Player plObj, WresIDGroup wrestler)
        {
            plObj.FormRen.DestroySprite();

            #region Variables
            int                    idx            = plObj.PlIdx;
            MatchSetting           matchSetting   = GlobalWork.inst.MatchSetting;
            MatchWrestlerInfo      info           = MatchConfiguration.CreateWrestlerInfo(wrestler.ID);
            Player                 player         = PlayerMan.inst.CreatePlayer(idx, null);
            WrestlerAppearanceData appearanceData = SaveData.inst.GetEditWrestlerData(info.wrestlerID).appearanceData;
            #endregion

            #region Setting wrestler appearance
            player.Init((WrestlerID)wrestler.ID, PadPort.AI, wrestler.Group);
            player.FormRen.InitTexture(appearanceData.costumeData[info.costume_no], null);
            player.FormRen.InitSprite(false);
            for (int i = 0; i < 5; i++)
            {
                Menu_SoundManager.Sound_ClipWrestlerVoice_List[idx, i] = null;
            }
            for (int j = 0; j < 5; j++)
            {
                Menu_SoundManager.Load_WrestlerVoice(idx, j, info.param.voiceType[j], info.param.voiceID[j]);
            }
            #endregion

            player.finishMove_Atk.Clear();
            player.finishMove_Def[0].Clear();
            player.finishMove_Def[1].Clear();

            if (idx < 4)
            {
                player.MyGroupPlIdx_Start    = 0;
                player.MyGroupPlIdx_End      = 4;
                player.EnemyGroupPlIdx_Start = 4;
                player.EnemyGroupPlIdx_End   = 8;
                player.finishWewstlerID      = matchSetting.matchWrestlerInfo[4].wrestlerID;
            }
            else
            {
                player.MyGroupPlIdx_Start    = 4;
                player.MyGroupPlIdx_End      = 8;
                player.EnemyGroupPlIdx_Start = 0;
                player.EnemyGroupPlIdx_End   = 4;
                player.finishWewstlerID      = matchSetting.matchWrestlerInfo[0].wrestlerID;
            }

            player.animator.ReqBasicAnm(BasicSkillEnum.Stand_Power_S, false, -1);
            player.animator.UpdateAnimation();
            player.animator.CurrentSkill  = SkillDataMan.inst.GetSkillData_Standard(BasicSkillEnum.Stand_Power_S);
            player.animator.CurrentAnmIdx = 0;
            player.animator.AnmHostPlayer = player.PlIdx;
            player.ChangeState(PlStateEnum.Stand);
            player.animator.isAnmPause = false;

            #region Setting player to enter
            VenueSetting venueSetting = Ring.inst.venueSetting;
            player.moveSpeed             = player.WresParam.walkSpeed;
            player.isLoseAndStop         = false;
            player.isLose                = false;
            player.isEntranceWalking     = false;
            player.isEntrancePerformance = false;
            player.hasRight              = true;
            player.SetSleep(false);
            player.TargetPlIdx = player.PlIdx;
            player.Group       = idx;

            //player.PlPos.x = MatchData.PlayerInitialPosTbl[idx].x;
            //player.PlPos.y = MatchData.PlayerInitialPosTbl[idx].y;
            #endregion

            PlayerMan.inst.SetPlayer(idx, player);
            return(player);
        }
Esempio n. 14
0
        private void we_resultList_SelectedIndexChanged(object sender, EventArgs e)
        {
            WresIDGroup edit = (WresIDGroup)we_resultList.SelectedItem;

            ws_promotionLbl.Text = promotionList[edit.Group] + " (" + (DataBase.GetWrestlerParam((WrestlerID)edit.ID).fightStyle + ")");;
        }