//============================================================================ //! その他ボタンが押された時の処理 private void _ClickButton(object iSender, RoutedEventArgs iArgs) { //チェック var button = iSender as Button; if (button == null) { return; } //チームに0人のところがあればエラー foreach (var iTeam in mTeamList) { if (iTeam.mJoinIDList.Count == 0) { SystemUtility.DisplayErrorDialog("所属が0人のチームがあります\n使用しない場合は削除を行ってください"); return; } } //チーム設定をして次へ var manager = BattleOperatorManager.GetInstance(); foreach (var iTeam in mTeamList) { var info = new BattleManager.SBattleTeamInfo(); info.mJoinIDList = new List <int>(iTeam.mJoinIDList.ToArray()); info.mTeamName = iTeam.mTeamName; manager.AddTeam(info); } manager.SetLockTeam(true); mDecideTeamDelegate(); }
/************************************************************************/ /* チーム系アクセサ */ /************************************************************************/ /// <summary> /// チームの追加 /// </summary> /// <param name="iTeamName">チーム名</param> public void AddTeam(BattleManager.SBattleTeamInfo iTeamInfo) { if (_CheckLockTeam()) { return; } //同名のチームが追加された場合はエラーとする foreach (var iInfo in mCurrentBattleInfo.mTeamList) { if (iInfo.mTeamName == iTeamInfo.mTeamName) { SystemUtility.DisplayErrorDialog("大会に同盟のチームを設定できません"); throw new System.Exception(); } } //追加 iTeamInfo.mTeamID = mCurrentBattleInfo.mTeamList.Count; mCurrentBattleInfo.mTeamList.Add(iTeamInfo); }
/************************************************************************/ /* コールバック処理 */ /************************************************************************/ //============================================================================ //! ロード時の処理 private void _Loaded(object iSender, RoutedEventArgs iArgs) { //シーンの初期化 var scene_Manager = SceneManager.GetInstance(); scene_Manager.SetControls(ContentControl, LeftFilterImage, RightFilterImage); LeftFilterImage.Margin = RightFilterImage.Margin = new Thickness(); //ロードコンテンツを設定する #if DL_DEBUG //ライセンス作成 if (true) { SystemUtility.CreateLicenseFiles(1); return; } bool test = true; if (test) { //データの設定 DataManager.GetInstance().SetData(SaveManager.GetInstance().PresetInfoKey, "BLAZBLUE CHRONOPHANTASMA"); //プロジェクトデータ設定 SaveManager.GetInstance().ProjectFilePath = @"C:\FCあどみぃ!\FCあどみぃ!\System\デバッグプロジェクト.pjb"; DataManager.GetInstance().ReadData(SaveManager.GetInstance().ProjectFilePath); //必要なマネージャの初期化 MemberManager.GetInstance().LoadMemberData(); BattleManager.GetInstance().LoadBattleData(); PresetManager.GetInstance().LoadPreset(); SystemManager.GetInstance().LoadSystemData(); //大会設定 var btl_Op_Manager = BattleOperatorManager.GetInstance(); btl_Op_Manager.BeginBattle(BattleManager.EBattleKind.BATTLE_SIMPLE_TOURNAMENT); btl_Op_Manager.SetBattleName("デバッグ大会!"); btl_Op_Manager.SetBattleObject(new SimpleTournamentObject()); //メンバー設定 //scene_Manager.AdvanceScene(SceneManager.EScene.SCENE_MEMBER_SELECT); foreach (var iIndex in System.Linq.Enumerable.Range(0, 32)) { btl_Op_Manager.AddMember(iIndex); } btl_Op_Manager.SetLockJoinMember(true); //チーム設定 var team_Val = 16; if (BattleOperatorManager.GetInstance().GetJoinMemberVal() % team_Val != 0) { throw new System.Exception(); } var in_Member_Val = BattleOperatorManager.GetInstance().GetJoinMemberVal() / team_Val; foreach (var iIndex in System.Linq.Enumerable.Range(0, team_Val)) { var info = new BattleManager.SBattleTeamInfo(); info.mTeamID = iIndex; info.mTeamName = string.Format("Team{0}", iIndex); info.mJoinIDList = new List <int>(); foreach (var iMemberIndex in System.Linq.Enumerable.Range(0, in_Member_Val)) { info.mJoinIDList.Add((iIndex * in_Member_Val) + iMemberIndex); } btl_Op_Manager.AddTeam(info); } btl_Op_Manager.SetLockTeam(true); //scene_Manager.AdvanceScene(SceneManager.EScene.SCENE_TEAM_SELECT); scene_Manager.AdvanceScene(SceneManager.EScene.SCENE_BATTLE_SIMPLE_TOURNAMENT); /*紅白戦 * var team = (TeamSelectScene)scene_Manager.AdvanceScene(SceneManager.EScene.SCENE_TEAM_SELECT); * team.AddTeam("紅組"); * team.AddTeam("白組"); * team.SetTeamOperateFlg(false);*/ //scene_Manager.AdvanceScene(SceneManager.EScene.SCENE_MEMBER_SELECT); } else #endif { var load_Scene = new LoadScene(); LoadContent.Content = load_Scene; } }